Merge rust-bitcoin/rust-bitcoin#3966: Change `#[must_use]` to be the same as stdlib
cb5ffde9ee
Change `#[must_use]` to be the same as stdlib (Jamil Lambert, PhD) Pull request description: Change the iterator `#[must_use]` message to be the same as stdlib uses. Message taken from https://doc.rust-lang.org/src/core/iter/traits/iterator.rs.html#38 Close #3962 ACKs for top commit: Kixunil: ACKcb5ffde9ee
tcharding: ACKcb5ffde9ee
Tree-SHA512: 4866d9bddccdc28e2ba2b15cb4041851abb1512cea0317f20d2e2306df6dcd1addb828d61a84a2083d3ef47abb5cf9276e857cf098de2d28b4706ecd0a1f24fa
This commit is contained in:
commit
28b867d8de
|
@ -103,7 +103,7 @@ impl Witness {
|
||||||
pub fn is_empty(&self) -> bool { self.witness_elements == 0 }
|
pub fn is_empty(&self) -> bool { self.witness_elements == 0 }
|
||||||
|
|
||||||
/// Returns a struct implementing [`Iterator`].
|
/// Returns a struct implementing [`Iterator`].
|
||||||
#[must_use = "returned iterator should be used"]
|
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||||
pub fn iter(&self) -> Iter {
|
pub fn iter(&self) -> Iter {
|
||||||
Iter { inner: self.content.as_slice(), indices_start: self.indices_start, current_index: 0 }
|
Iter { inner: self.content.as_slice(), indices_start: self.indices_start, current_index: 0 }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue