Skip to content

Commit b81f08c

Browse files
committed
Return result of function call
Clippy emits: warning: question mark operator is useless here Remove `Ok` and `?`, return result of function call directly.
1 parent fc37f41 commit b81f08c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/descriptor/key.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,11 +1072,9 @@ impl FromStr for DefiniteDescriptorKey {
10721072

10731073
fn from_str(s: &str) -> Result<Self, Self::Err> {
10741074
let inner = DescriptorPublicKey::from_str(s)?;
1075-
Ok(
1076-
DefiniteDescriptorKey::new(inner).ok_or(DescriptorKeyParseError(
1077-
"cannot parse key with a wilcard as a DerivedDescriptorKey",
1078-
))?,
1079-
)
1075+
DefiniteDescriptorKey::new(inner).ok_or(DescriptorKeyParseError(
1076+
"cannot parse key with a wilcard as a DerivedDescriptorKey",
1077+
))
10801078
}
10811079
}
10821080

0 commit comments

Comments
 (0)