Skip to content

Commit 2192bef

Browse files
committed
clippy: fix the match_wildcard_for_single_variants lint
Better to be explicit.
1 parent 41cda57 commit 2192bef

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/pset/serialize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ impl Serialize for confidential::Value {
227227
match self {
228228
confidential::Value::Null => vec![], // should never be invoked
229229
confidential::Value::Explicit(x) => Serialize::serialize(x),
230-
y => encode::serialize(y), // confidential can serialized as is
230+
confidential::Value::Confidential(_) => encode::serialize(self), // confidential can serialized as is
231231
}
232232
}
233233
}
@@ -272,7 +272,7 @@ impl Serialize for confidential::Asset {
272272
match self {
273273
confidential::Asset::Null => vec![], // should never be invoked
274274
confidential::Asset::Explicit(x) => Serialize::serialize(x),
275-
y => encode::serialize(y), // confidential can serialized as is
275+
confidential::Asset::Confidential(_) => encode::serialize(self), // confidential can serialized as is
276276
}
277277
}
278278
}

src/sighash.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl<T> Prevouts<'_, T> where T: Borrow<TxOut> {
180180
fn get_all(&self) -> Result<&[T], Error> {
181181
match self {
182182
Prevouts::All(prevouts) => Ok(*prevouts),
183-
_ => Err(Error::PrevoutKind),
183+
Prevouts::One(..) => Err(Error::PrevoutKind),
184184
}
185185
}
186186

0 commit comments

Comments
 (0)