File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ pub(crate) fn create_block<'rc>(param: &PathAndJson<'rc>) -> BlockContext<'rc> {
5
5
let mut block = BlockContext :: new ( ) ;
6
6
7
7
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 )
9
9
} else {
10
10
// use clone for now
11
11
block. set_base_value ( param. value ( ) . clone ( ) ) ;
Original file line number Diff line number Diff line change @@ -687,7 +687,7 @@ impl Renderable for Template {
687
687
}
688
688
689
689
if e. template_name . is_none ( ) {
690
- e. template_name = self . name . clone ( ) ;
690
+ e. template_name . clone_from ( & self . name ) ;
691
691
}
692
692
693
693
e
@@ -715,7 +715,7 @@ impl Evaluable for Template {
715
715
}
716
716
}
717
717
718
- e. template_name = self . name . clone ( ) ;
718
+ e. template_name . clone_from ( & self . name ) ;
719
719
e
720
720
} ) ?;
721
721
}
Original file line number Diff line number Diff line change @@ -536,7 +536,7 @@ impl Template {
536
536
fn remove_previous_whitespace ( template_stack : & mut VecDeque < Template > ) {
537
537
let t = template_stack. front_mut ( ) . unwrap ( ) ;
538
538
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 ) ;
540
540
}
541
541
}
542
542
@@ -566,9 +566,9 @@ impl Template {
566
566
// check the last element before current
567
567
if let Some ( RawString ( ref mut text) ) = t. elements . last_mut ( ) {
568
568
// 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 ) ;
572
572
}
573
573
}
574
574
You can’t perform that action at this time.
0 commit comments