Skip to content

Commit d09e922

Browse files
committed
Use trim_start_matches
Now that we are bumping the MSRV to greater than 1.30 we can use `trim_start_matches`. Use `trim_start_matches` and remove the clippy directive.
1 parent f33c73d commit d09e922

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/util/psbt/map/input.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ impl fmt::Display for PsbtSighashType {
166166
}
167167
}
168168

169-
#[allow(deprecated)] // TODO: Swap `trim_left_matches` for `trim_start_matches` once MSRV >= 1.30.
170169
impl FromStr for PsbtSighashType {
171170
type Err = SighashTypeParseError;
172171

@@ -184,7 +183,7 @@ impl FromStr for PsbtSighashType {
184183
}
185184

186185
// We accept non-standard sighash values.
187-
if let Ok(inner) = u32::from_str_radix(s.trim_left_matches("0x"), 16) {
186+
if let Ok(inner) = u32::from_str_radix(s.trim_start_matches("0x"), 16) {
188187
return Ok(PsbtSighashType { inner });
189188
}
190189

0 commit comments

Comments
 (0)