mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-10-02 15:26:08 +00:00
Implement Default for Chain to be an empty chain
This commit is contained in:
parent
ca2b8b9bb0
commit
2d8d0aa02a
10
src/chain.rs
10
src/chain.rs
@ -75,3 +75,13 @@ impl ExactSizeIterator for Chain<'_> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for Chain<'_> {
|
||||||
|
fn default() -> Self {
|
||||||
|
Chain {
|
||||||
|
state: ChainState::Buffered {
|
||||||
|
rest: Vec::new().into_iter(),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user