File tree Expand file tree Collapse file tree 4 files changed +9
-9
lines changed
Expand file tree Collapse file tree 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ pub fn run() {
248248 . run ( )
249249 . with_context ( || format ! ( "by svdtools ({})" , clap:: crate_version!( ) ) )
250250 {
251- log:: error!( "{:?}" , e ) ;
251+ log:: error!( "{e :?}" ) ;
252252
253253 std:: process:: exit ( 1 ) ;
254254 }
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ fn short_ra(ra: Option<ReadAction>) -> &'static str {
122122
123123trait GetI64 {
124124 fn get_i64 ( & self , key : & str ) -> Option < i64 > ;
125- fn get_str ( & self , key : & str ) -> Option < Cow < str > > ;
125+ fn get_str ( & self , key : & str ) -> Option < Cow < ' _ , str > > ;
126126}
127127
128128impl GetI64 for Object {
@@ -131,7 +131,7 @@ impl GetI64 for Object {
131131 . and_then ( |v| v. as_view ( ) . as_scalar ( ) )
132132 . and_then ( |s| s. to_integer ( ) )
133133 }
134- fn get_str ( & self , key : & str ) -> Option < Cow < str > > {
134+ fn get_str ( & self , key : & str ) -> Option < Cow < ' _ , str > > {
135135 self . get ( key)
136136 . and_then ( |v| v. as_view ( ) . as_scalar ( ) )
137137 . map ( |s| s. into_cow_str ( ) )
@@ -508,7 +508,7 @@ fn parse_device(svdfile: impl AsRef<Path>) -> anyhow::Result<Object> {
508508
509509fn process_svd ( svdfile : impl AsRef < Path > ) -> anyhow:: Result < Object > {
510510 let svdfile = svdfile. as_ref ( ) . to_str ( ) . unwrap ( ) ;
511- println ! ( "Processing {}" , svdfile ) ;
511+ println ! ( "Processing {svdfile}" ) ;
512512 parse_device ( svdfile) . with_context ( || format ! ( "In file {svdfile}" ) )
513513}
514514
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ where
2929 Self : Iterator + Sized ,
3030 Self :: Item : Name ,
3131{
32- fn matched ( self , spec : & str ) -> MatchIter < Self > ;
32+ fn matched ( self , spec : & str ) -> MatchIter < ' _ , Self > ;
3333}
3434
3535impl < I > Matched for I
3636where
3737 Self : Iterator + Sized ,
3838 Self :: Item : Name ,
3939{
40- fn matched ( self , spec : & str ) -> MatchIter < Self > {
40+ fn matched ( self , spec : & str ) -> MatchIter < ' _ , Self > {
4141 MatchIter { it : self , spec }
4242 }
4343}
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
226226 if let Entry :: Occupied ( mut e) = parent. entry ( key. clone ( ) ) {
227227 match e. get_mut ( ) {
228228 el if el == val => {
229- println ! ( "In {key:?}: dublicate rule {val:?}, ignored" ) ;
229+ println ! ( "In {key:?}: duplicate rule {val:?}, ignored" ) ;
230230 }
231231 Yaml :: Array ( a) => match val {
232232 Yaml :: Array ( val) => {
@@ -236,7 +236,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
236236 if !a. contains ( val) {
237237 a. push ( val. clone ( ) ) ;
238238 } else {
239- println ! ( "In {key:?}: dublicate rule {val:?}, ignored" ) ;
239+ println ! ( "In {key:?}: duplicate rule {val:?}, ignored" ) ;
240240 }
241241 }
242242 _ => { }
@@ -251,7 +251,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
251251 a. insert ( 0 , s. clone ( ) ) ;
252252 e. insert ( Yaml :: Array ( a) ) ;
253253 } else {
254- println ! ( "In {key:?}: dublicate rule {s:?}, ignored" ) ;
254+ println ! ( "In {key:?}: duplicate rule {s:?}, ignored" ) ;
255255 }
256256 }
257257 s2 if matches ! ( s2, Yaml :: String ( _) ) => {
You can’t perform that action at this time.
0 commit comments