Merge rust-bitcoin/rust-bitcoin#938: Allow deprecated function call

29843c41ef Allow deprecated function call (Tobin Harding)

Pull request description:

  We have a deprecated function call because of the MSRV, tell clippy to ignore it.

ACKs for top commit:
  Kixunil:
    ACK 29843c41ef conditioned on adding this to MSRV bump TODO list.
  sanket1729:
    ACK 29843c41ef.

Tree-SHA512: 3e2bf95d05c3baff4f01c447717dde4e78d686cbc6f720591f6656ce1e5d8cf3a276a0c3dc0016dea357b61350091778d4500a59427ea9863eb5bb9344b822e4
This commit is contained in:
sanket1729 2022-04-11 09:19:56 -07:00
commit 96edd94535
No known key found for this signature in database
GPG Key ID: 648FFB183E0870A2
1 changed files with 1 additions and 1 deletions

View File

@ -166,6 +166,7 @@ impl fmt::Display for PsbtSighashType {
} }
} }
#[allow(deprecated)] // TODO: Swap `trim_left_matches` for `trim_start_matches` once MSRV >= 1.30.
impl FromStr for PsbtSighashType { impl FromStr for PsbtSighashType {
type Err = SighashTypeParseError; type Err = SighashTypeParseError;
@ -183,7 +184,6 @@ impl FromStr for PsbtSighashType {
} }
// We accept non-standard sighash values. // We accept non-standard sighash values.
// TODO: Swap `trim_left_matches` for `trim_start_matches` once MSRV >= 1.30.
if let Ok(inner) = u32::from_str_radix(s.trim_left_matches("0x"), 16) { if let Ok(inner) = u32::from_str_radix(s.trim_left_matches("0x"), 16) {
return Ok(PsbtSighashType { inner }); return Ok(PsbtSighashType { inner });
} }