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() {
248
248
. run ( )
249
249
. with_context ( || format ! ( "by svdtools ({})" , clap:: crate_version!( ) ) )
250
250
{
251
- log:: error!( "{:?}" , e ) ;
251
+ log:: error!( "{e :?}" ) ;
252
252
253
253
std:: process:: exit ( 1 ) ;
254
254
}
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ fn short_ra(ra: Option<ReadAction>) -> &'static str {
122
122
123
123
trait GetI64 {
124
124
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 > > ;
126
126
}
127
127
128
128
impl GetI64 for Object {
@@ -131,7 +131,7 @@ impl GetI64 for Object {
131
131
. and_then ( |v| v. as_view ( ) . as_scalar ( ) )
132
132
. and_then ( |s| s. to_integer ( ) )
133
133
}
134
- fn get_str ( & self , key : & str ) -> Option < Cow < str > > {
134
+ fn get_str ( & self , key : & str ) -> Option < Cow < ' _ , str > > {
135
135
self . get ( key)
136
136
. and_then ( |v| v. as_view ( ) . as_scalar ( ) )
137
137
. map ( |s| s. into_cow_str ( ) )
@@ -508,7 +508,7 @@ fn parse_device(svdfile: impl AsRef<Path>) -> anyhow::Result<Object> {
508
508
509
509
fn process_svd ( svdfile : impl AsRef < Path > ) -> anyhow:: Result < Object > {
510
510
let svdfile = svdfile. as_ref ( ) . to_str ( ) . unwrap ( ) ;
511
- println ! ( "Processing {}" , svdfile ) ;
511
+ println ! ( "Processing {svdfile}" ) ;
512
512
parse_device ( svdfile) . with_context ( || format ! ( "In file {svdfile}" ) )
513
513
}
514
514
Original file line number Diff line number Diff line change @@ -29,15 +29,15 @@ where
29
29
Self : Iterator + Sized ,
30
30
Self :: Item : Name ,
31
31
{
32
- fn matched ( self , spec : & str ) -> MatchIter < Self > ;
32
+ fn matched ( self , spec : & str ) -> MatchIter < ' _ , Self > ;
33
33
}
34
34
35
35
impl < I > Matched for I
36
36
where
37
37
Self : Iterator + Sized ,
38
38
Self :: Item : Name ,
39
39
{
40
- fn matched ( self , spec : & str ) -> MatchIter < Self > {
40
+ fn matched ( self , spec : & str ) -> MatchIter < ' _ , Self > {
41
41
MatchIter { it : self , spec }
42
42
}
43
43
}
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
226
226
if let Entry :: Occupied ( mut e) = parent. entry ( key. clone ( ) ) {
227
227
match e. get_mut ( ) {
228
228
el if el == val => {
229
- println ! ( "In {key:?}: dublicate rule {val:?}, ignored" ) ;
229
+ println ! ( "In {key:?}: duplicate rule {val:?}, ignored" ) ;
230
230
}
231
231
Yaml :: Array ( a) => match val {
232
232
Yaml :: Array ( val) => {
@@ -236,7 +236,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
236
236
if !a. contains ( val) {
237
237
a. push ( val. clone ( ) ) ;
238
238
} else {
239
- println ! ( "In {key:?}: dublicate rule {val:?}, ignored" ) ;
239
+ println ! ( "In {key:?}: duplicate rule {val:?}, ignored" ) ;
240
240
}
241
241
}
242
242
_ => { }
@@ -251,7 +251,7 @@ fn update_dict(parent: &mut Hash, child: &Hash) -> Result<()> {
251
251
a. insert ( 0 , s. clone ( ) ) ;
252
252
e. insert ( Yaml :: Array ( a) ) ;
253
253
} else {
254
- println ! ( "In {key:?}: dublicate rule {s:?}, ignored" ) ;
254
+ println ! ( "In {key:?}: duplicate rule {s:?}, ignored" ) ;
255
255
}
256
256
}
257
257
s2 if matches ! ( s2, Yaml :: String ( _) ) => {
You can’t perform that action at this time.
0 commit comments