Skip to content

Commit ab12a60

Browse files
committed
Merge rust-bitcoin#5136: Remove option from current_chunk function signature
fcfaafc Update API text files (Tobin C. Harding) 48352fe Remove option from current_chunk function signature (Tobin C. Harding) d8dd960 consensus_encoding: Add a test for empty encoders (Tobin C. Harding) Pull request description: The `Option` was observed to be pointless, we can just return the empty list. Note that the diff is noisy AF but there is basically no changes to the test logic which confirms the observation. (Andrew made the observation, Tobin needed tests to convince himself.) Note patch 1 adds an impl of `Encodable` for `&Script` - I can't remember what is the correct thing to do, we went through this before ... ACKs for top commit: jrakibi: ACK rust-bitcoin@fcfaafc apoelstra: ACK fcfaafc; successfully ran local tests Tree-SHA512: ac9632b978544b7280219274fc2953ed24d13c57e3ec7630ff9297781e8f2cbec9ae61862946c303047344bd22719df8e735a8578b85df2c1989f101e8bae8a9
2 parents 1d97640 + fcfaafc commit ab12a60

File tree

7 files changed

+253
-228
lines changed

7 files changed

+253
-228
lines changed

api/units/all-features.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1904,7 +1904,7 @@ pub fn bitcoin_units::amount::AmountDecoder::new() -> Self
19041904
pub fn bitcoin_units::amount::AmountDecoder::push_bytes(&mut self, bytes: &mut &[u8]) -> core::result::Result<bool, Self::Error>
19051905
pub fn bitcoin_units::amount::AmountDecoder::read_limit(&self) -> usize
19061906
pub fn bitcoin_units::amount::AmountEncoder::advance(&mut self) -> bool
1907-
pub fn bitcoin_units::amount::AmountEncoder::current_chunk(&self) -> core::option::Option<&[u8]>
1907+
pub fn bitcoin_units::amount::AmountEncoder::current_chunk(&self) -> &[u8]
19081908
pub fn bitcoin_units::amount::Denomination::arbitrary(u: &mut arbitrary::unstructured::Unstructured<'a>) -> arbitrary::error::Result<Self>
19091909
pub fn bitcoin_units::amount::Denomination::clone(&self) -> bitcoin_units::amount::Denomination
19101910
pub fn bitcoin_units::amount::Denomination::eq(&self, other: &bitcoin_units::amount::Denomination) -> bool
@@ -2023,7 +2023,7 @@ pub fn bitcoin_units::block::BlockHeightDecoderError::fmt(&self, f: &mut core::f
20232023
pub fn bitcoin_units::block::BlockHeightDecoderError::from(never: core::convert::Infallible) -> Self
20242024
pub fn bitcoin_units::block::BlockHeightDecoderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)>
20252025
pub fn bitcoin_units::block::BlockHeightEncoder::advance(&mut self) -> bool
2026-
pub fn bitcoin_units::block::BlockHeightEncoder::current_chunk(&self) -> core::option::Option<&[u8]>
2026+
pub fn bitcoin_units::block::BlockHeightEncoder::current_chunk(&self) -> &[u8]
20272027
pub fn bitcoin_units::block::BlockHeightInterval::add(self, rhs: &bitcoin_units::block::BlockHeightInterval) -> Self::Output
20282028
pub fn bitcoin_units::block::BlockHeightInterval::add(self, rhs: bitcoin_units::block::BlockHeightInterval) -> Self::Output
20292029
pub fn bitcoin_units::block::BlockHeightInterval::add_assign(&mut self, rhs: &bitcoin_units::block::BlockHeightInterval)
@@ -2168,7 +2168,7 @@ pub fn bitcoin_units::locktime::absolute::LockTimeDecoder::new() -> Self
21682168
pub fn bitcoin_units::locktime::absolute::LockTimeDecoder::push_bytes(&mut self, bytes: &mut &[u8]) -> core::result::Result<bool, Self::Error>
21692169
pub fn bitcoin_units::locktime::absolute::LockTimeDecoder::read_limit(&self) -> usize
21702170
pub fn bitcoin_units::locktime::absolute::LockTimeEncoder::advance(&mut self) -> bool
2171-
pub fn bitcoin_units::locktime::absolute::LockTimeEncoder::current_chunk(&self) -> core::option::Option<&[u8]>
2171+
pub fn bitcoin_units::locktime::absolute::LockTimeEncoder::current_chunk(&self) -> &[u8]
21722172
pub fn bitcoin_units::locktime::absolute::MedianTimePast::arbitrary(u: &mut arbitrary::unstructured::Unstructured<'a>) -> arbitrary::error::Result<Self>
21732173
pub fn bitcoin_units::locktime::absolute::MedianTimePast::clone(&self) -> bitcoin_units::locktime::absolute::MedianTimePast
21742174
pub fn bitcoin_units::locktime::absolute::MedianTimePast::cmp(&self, other: &bitcoin_units::locktime::absolute::MedianTimePast) -> core::cmp::Ordering
@@ -2439,7 +2439,7 @@ pub fn bitcoin_units::sequence::SequenceDecoderError::fmt(&self, f: &mut core::f
24392439
pub fn bitcoin_units::sequence::SequenceDecoderError::from(never: core::convert::Infallible) -> Self
24402440
pub fn bitcoin_units::sequence::SequenceDecoderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)>
24412441
pub fn bitcoin_units::sequence::SequenceEncoder::advance(&mut self) -> bool
2442-
pub fn bitcoin_units::sequence::SequenceEncoder::current_chunk(&self) -> core::option::Option<&[u8]>
2442+
pub fn bitcoin_units::sequence::SequenceEncoder::current_chunk(&self) -> &[u8]
24432443
pub fn bitcoin_units::time::BlockTimeDecoder::default() -> Self
24442444
pub fn bitcoin_units::time::BlockTimeDecoder::end(self) -> core::result::Result<Self::Output, Self::Error>
24452445
pub fn bitcoin_units::time::BlockTimeDecoder::new() -> Self
@@ -2451,7 +2451,7 @@ pub fn bitcoin_units::time::BlockTimeDecoderError::fmt(&self, f: &mut core::fmt:
24512451
pub fn bitcoin_units::time::BlockTimeDecoderError::from(never: core::convert::Infallible) -> Self
24522452
pub fn bitcoin_units::time::BlockTimeDecoderError::source(&self) -> core::option::Option<&(dyn core::error::Error + 'static)>
24532453
pub fn bitcoin_units::time::BlockTimeEncoder::advance(&mut self) -> bool
2454-
pub fn bitcoin_units::time::BlockTimeEncoder::current_chunk(&self) -> core::option::Option<&[u8]>
2454+
pub fn bitcoin_units::time::BlockTimeEncoder::current_chunk(&self) -> &[u8]
24552455
pub fn core::num::error::ParseIntError::from(value: bitcoin_units::parse_int::ParseIntError) -> Self
24562456
pub fn i64::mul(self, rhs: &bitcoin_units::SignedAmount) -> Self::Output
24572457
pub fn i64::mul(self, rhs: &bitcoin_units::result::NumOpResult<bitcoin_units::SignedAmount>) -> Self::Output

0 commit comments

Comments
 (0)