Fix 4 new clippy lints
This commit is contained in:
parent
2dc7809367
commit
33eac07b1a
@ -1,5 +1,5 @@
|
|||||||
use crate::Frontmatter;
|
use crate::Frontmatter;
|
||||||
use std::path::PathBuf;
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
/// Context holds metadata about a note which is being parsed.
|
/// Context holds metadata about a note which is being parsed.
|
||||||
@ -55,7 +55,7 @@ impl Context {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Create a new `Context` which inherits from a parent Context.
|
/// Create a new `Context` which inherits from a parent Context.
|
||||||
pub fn from_parent(context: &Context, child: &PathBuf) -> Context {
|
pub fn from_parent(context: &Context, child: &Path) -> Context {
|
||||||
let mut context = context.clone();
|
let mut context = context.clone();
|
||||||
context.file_tree.push(child.to_path_buf());
|
context.file_tree.push(child.to_path_buf());
|
||||||
context
|
context
|
||||||
|
@ -317,7 +317,7 @@ impl<'a> Exporter<'a> {
|
|||||||
self.destination.clone()
|
self.destination.clone()
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return Ok(self.export_note(&self.root, &destination)?);
|
return self.export_note(&self.root, &destination);
|
||||||
}
|
}
|
||||||
|
|
||||||
if !self.destination.exists() {
|
if !self.destination.exists() {
|
||||||
|
@ -3,7 +3,7 @@ use gumdrop::Options;
|
|||||||
use obsidian_export::{ExportError, Exporter, FrontmatterStrategy, WalkOptions};
|
use obsidian_export::{ExportError, Exporter, FrontmatterStrategy, WalkOptions};
|
||||||
use std::{env, path::PathBuf};
|
use std::{env, path::PathBuf};
|
||||||
|
|
||||||
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
|
|
||||||
#[derive(Debug, Options)]
|
#[derive(Debug, Options)]
|
||||||
struct Opts {
|
struct Opts {
|
||||||
|
@ -79,8 +79,8 @@ impl<'a> ObsidianNoteReference<'a> {
|
|||||||
|
|
||||||
ObsidianNoteReference {
|
ObsidianNoteReference {
|
||||||
file,
|
file,
|
||||||
label,
|
|
||||||
section,
|
section,
|
||||||
|
label,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user