Browse Source

Clippy

index-subcmd
Vincent Prouillet 7 years ago
parent
commit
3fb06ac791
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/bin/console.rs
  2. +1
    -1
      src/fs.rs
  3. +1
    -1
      src/site.rs

+ 1
- 1
src/bin/console.rs View File

@@ -66,7 +66,7 @@ pub fn report_elapsed_time(instant: Instant) {

/// Display an error message and the actual error(s)
pub fn unravel_errors(message: &str, error: &Error) {
if message.len() > 0 {
if !message.is_empty() {
self::error(message);
}
self::error(&format!("Error: {}", error));


+ 1
- 1
src/fs.rs View File

@@ -14,7 +14,7 @@ pub fn create_file(path: &Path, content: &str) -> Result<()> {
/// Create a directory at the given path if it doesn't exist already
pub fn ensure_directory_exists(path: &Path) -> Result<()> {
if !path.exists() {
create_directory(&path)?;
create_directory(path)?;
}
Ok(())
}


+ 1
- 1
src/site.rs View File

@@ -181,7 +181,7 @@ impl Site {
/// Defaults to `AnchorInsert::None` if no parent section found
pub fn find_parent_section_insert_anchor(&self, parent_path: &PathBuf) -> InsertAnchor {
match self.sections.get(&parent_path.join("_index.md")) {
Some(ref s) => s.meta.insert_anchor.unwrap(),
Some(s) => s.meta.insert_anchor.unwrap(),
None => InsertAnchor::None
}
}


Loading…
Cancel
Save