File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,13 +30,14 @@ pub struct ResolveState {
3030
3131impl ResolveState {
3232 /// Pushes the provided index into the last element of current_keys as `[idx]`.
33- pub ( crate ) fn push_list_index ( & mut self , idx : usize ) {
33+ pub ( crate ) fn push_list_index ( & mut self , idx : usize ) -> std:: fmt:: Result {
34+ use std:: fmt:: Write ;
3435 let mut kcount = self . current_keys . len ( ) ;
3536 if kcount == 0 {
3637 self . current_keys . push ( String :: new ( ) ) ;
3738 kcount = 1 ;
3839 }
39- self . current_keys [ kcount - 1 ] . push_str ( & format ! ( "[{idx}]" ) ) ;
40+ write ! ( & mut self . current_keys[ kcount - 1 ] , "[{idx}]" )
4041 }
4142
4243 /// Pushes mapping key into the `current_keys` list. If possible, the provided value is
Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ impl Value {
554554 // Sequence either, since there's no potential to start recursing again, if
555555 // we've fully interpolated a Sequence.
556556 let mut st = state. clone ( ) ;
557- st. push_list_index ( idx) ;
557+ st. push_list_index ( idx) ? ;
558558 let e = it. interpolate ( root, & mut st) ?;
559559 seq. push ( e) ;
560560 }
You can’t perform that action at this time.
0 commit comments