File tree Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Expand file tree Collapse file tree 4 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ struct EventIntermediate<'a> {
339
339
pub created_at : Cow < ' a , Timestamp > ,
340
340
pub kind : Cow < ' a , Kind > ,
341
341
pub tags : Cow < ' a , Tags > ,
342
- pub content : Cow < ' a , String > ,
342
+ pub content : Cow < ' a , str > ,
343
343
pub sig : Cow < ' a , Signature > ,
344
344
}
345
345
Original file line number Diff line number Diff line change @@ -27,11 +27,9 @@ impl fmt::Display for Error {
27
27
fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
28
28
match self {
29
29
Self :: Secp256k1 ( ref e) => write ! ( f, "{e}" ) ,
30
- Self :: InvalidChildNumber ( ref n) => write ! (
31
- f,
32
- "child number {} is invalid (not within [0, 2^31 - 1])" ,
33
- n
34
- ) ,
30
+ Self :: InvalidChildNumber ( ref n) => {
31
+ write ! ( f, "child number {n} is invalid (not within [0, 2^31 - 1])" )
32
+ }
35
33
}
36
34
}
37
35
}
Original file line number Diff line number Diff line change @@ -384,7 +384,7 @@ mod tests {
384
384
for i in ( 0 ..len) . step_by ( 2 ) {
385
385
let high = val ( hex[ i] , i) ;
386
386
let low = val ( hex[ i + 1 ] , i + 1 ) ;
387
- bytes. push ( high << 4 | low) ;
387
+ bytes. push ( ( high << 4 ) | low) ;
388
388
}
389
389
390
390
bytes
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ impl fmt::Display for Error {
31
31
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
32
32
match self {
33
33
Self :: InvalidHexCharacter { c, index } => {
34
- write ! ( f, "Invalid character {} at position {}" , c , index )
34
+ write ! ( f, "Invalid character {c } at position {index}" )
35
35
}
36
36
Self :: OddLength => write ! ( f, "Odd number of digits" ) ,
37
37
Self :: InvalidLength => write ! ( f, "Invalid length" ) ,
You can’t perform that action at this time.
0 commit comments