From fc7ebd111ac86d45bf917f99832f91d496751656 Mon Sep 17 00:00:00 2001 From: Nick Groenen Date: Sun, 4 Aug 2024 11:59:17 +0200 Subject: [PATCH] Remove some unnecessary borrows --- src/lib.rs | 2 +- tests/postprocessors_test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ff6f111..dac7566 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -378,7 +378,7 @@ impl<'a> Exporter<'a> { .filter(|file| file.starts_with(&self.start_at)) .try_for_each(|file| { let relative_path = file - .strip_prefix(&self.start_at.clone()) + .strip_prefix(self.start_at.clone()) .expect("file should always be nested under root") .to_path_buf(); let destination = &self.destination.join(relative_path); diff --git a/tests/postprocessors_test.rs b/tests/postprocessors_test.rs index 5ea88b4..ed66e21 100644 --- a/tests/postprocessors_test.rs +++ b/tests/postprocessors_test.rs @@ -203,7 +203,7 @@ fn test_embed_postprocessors_context() { } let is_root_note = ctx .frontmatter - .get(&Value::String("is_root_note".into())) + .get(Value::String("is_root_note".into())) .unwrap(); if is_root_note != &Value::Bool(true) { // NOTE: Test failure may not give output consistently because the test binary @@ -220,7 +220,7 @@ fn test_embed_postprocessors_context() { exporter.add_embed_postprocessor(&|ctx, _mdevents| { let is_root_note = ctx .frontmatter - .get(&Value::String("is_root_note".into())) + .get(Value::String("is_root_note".into())) .unwrap(); if is_root_note == &Value::Bool(true) { // NOTE: Test failure may not give output consistently because the test binary