Fix 4 new clippy lints

This commit is contained in:
Nick Groenen 2021-07-27 15:00:44 +02:00
parent 2dc7809367
commit 33eac07b1a
No known key found for this signature in database
GPG Key ID: 4F0AD019928AE098
4 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,5 @@
use crate::Frontmatter;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
#[derive(Debug, Clone)]
/// 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.
pub fn from_parent(context: &Context, child: &PathBuf) -> Context {
pub fn from_parent(context: &Context, child: &Path) -> Context {
let mut context = context.clone();
context.file_tree.push(child.to_path_buf());
context

View File

@ -317,7 +317,7 @@ impl<'a> Exporter<'a> {
self.destination.clone()
}
};
return Ok(self.export_note(&self.root, &destination)?);
return self.export_note(&self.root, &destination);
}
if !self.destination.exists() {

View File

@ -3,7 +3,7 @@ use gumdrop::Options;
use obsidian_export::{ExportError, Exporter, FrontmatterStrategy, WalkOptions};
use std::{env, path::PathBuf};
const VERSION: &'static str = env!("CARGO_PKG_VERSION");
const VERSION: &str = env!("CARGO_PKG_VERSION");
#[derive(Debug, Options)]
struct Opts {

View File

@ -79,8 +79,8 @@ impl<'a> ObsidianNoteReference<'a> {
ObsidianNoteReference {
file,
label,
section,
label,
}
}