FJF2WKUK6PNGAEJM5OGC2YHZVJLURWJ7TKVTOKC3XWSBO54QNIBAC
VSLQNAQBAGOJC2IV55V3W755UIPN47J4RTCCLCABRFFFUU5LT2JQC
XPE6XANXV2TTPCF7BO5RNYGAZVHA3OKDFETBOWVGG7TVRCLRKAEQC
45AUHCDJX5A54AYFMJRGDHKMBQ3WYBIPAVPDPY7TCLK5WN5TSROQC
CITEDKPB6MKVZUEYEDE5ZKTNVY35HCOAXKDPYG7YLLEOVFNMSRXQC
RIKD63GT7RFV3UAV4BYD57GFXKXALWUP6J7AAHB3M6JVAZ3WFTXAC
MCPTFJMN333Z2GVL5J2KPLR6BJ3TAZKUGFORXNZ4YZBRXVQLCMFQC
impl DoubleEndedIterator for Chain<'_> {
fn next_back(&mut self) -> Option<Self::Item> {
match &mut self.state {
Linked { mut next } => {
let mut rest = Vec::new();
while let Some(cause) = next {
next = cause.source();
rest.push(cause);
}
let mut rest = rest.into_iter();
let last = rest.next_back();
self.state = Buffered { rest };
last
}
Buffered { rest } => rest.next_back(),
}
}
}