Remove as_inner
`self` and the referenced type returned by `as_inner` are both `Copy` types. There is no need to provide an reference getter method to a `Copy` type since implementing `Copy` implies that copying is cheap.
This commit is contained in:
parent
99ae48ab01
commit
6874ce91e2
|
@ -473,7 +473,7 @@ impl Payload {
|
||||||
pub fn p2tr_tweaked(output_key: TweakedPublicKey) -> Payload {
|
pub fn p2tr_tweaked(output_key: TweakedPublicKey) -> Payload {
|
||||||
Payload::WitnessProgram {
|
Payload::WitnessProgram {
|
||||||
version: WitnessVersion::V1,
|
version: WitnessVersion::V1,
|
||||||
program: output_key.as_inner().serialize().to_vec(),
|
program: output_key.to_inner().serialize().to_vec(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -165,11 +165,6 @@ impl TweakedPublicKey {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns a reference to underlying public key.
|
|
||||||
pub fn as_inner(&self) -> &crate::XOnlyPublicKey {
|
|
||||||
&self.0
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Serialize the key as a byte-encoded pair of values. In compressed form
|
/// Serialize the key as a byte-encoded pair of values. In compressed form
|
||||||
/// the y-coordinate is represented by only a single bit, as x determines
|
/// the y-coordinate is represented by only a single bit, as x determines
|
||||||
/// it up to one bit.
|
/// it up to one bit.
|
||||||
|
|
Loading…
Reference in New Issue