Skip to content

Commit e7d6341

Browse files
committed
fix: resolve lint errors from latest nightly
1 parent 40824c6 commit e7d6341

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/helpers/block_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub(crate) fn create_block<'rc>(param: &PathAndJson<'rc>) -> BlockContext<'rc> {
55
let mut block = BlockContext::new();
66

77
if let Some(new_path) = param.context_path() {
8-
*block.base_path_mut() = new_path.clone();
8+
block.base_path_mut().clone_from(new_path)
99
} else {
1010
// use clone for now
1111
block.set_base_value(param.value().clone());

src/render.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ impl Renderable for Template {
687687
}
688688

689689
if e.template_name.is_none() {
690-
e.template_name = self.name.clone();
690+
e.template_name.clone_from(&self.name);
691691
}
692692

693693
e
@@ -715,7 +715,7 @@ impl Evaluable for Template {
715715
}
716716
}
717717

718-
e.template_name = self.name.clone();
718+
e.template_name.clone_from(&self.name);
719719
e
720720
})?;
721721
}

src/template.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ impl Template {
536536
fn remove_previous_whitespace(template_stack: &mut VecDeque<Template>) {
537537
let t = template_stack.front_mut().unwrap();
538538
if let Some(RawString(ref mut text)) = t.elements.last_mut() {
539-
*text = text.trim_end().to_owned();
539+
text.trim_end().to_owned().clone_into(text);
540540
}
541541
}
542542

@@ -566,9 +566,9 @@ impl Template {
566566
// check the last element before current
567567
if let Some(RawString(ref mut text)) = t.elements.last_mut() {
568568
// trim leading space for standalone statement
569-
*text = text
570-
.trim_end_matches(support::str::whitespace_matcher)
571-
.to_owned();
569+
text.trim_end_matches(support::str::whitespace_matcher)
570+
.to_owned()
571+
.clone_into(text);
572572
}
573573
}
574574

0 commit comments

Comments
 (0)