Remove some unnecessary borrows
This commit is contained in:
parent
c32d70ac06
commit
fc7ebd111a
@ -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);
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user