SG6KZY4MUKOBPA7BBFRGGZIP36HWQ3WXJACMLBCZ57RX2HCWHWRQC
let mut chain = self.chain().skip(1).enumerate().peekable();
if let Some((n, error)) = chain.next() {
write!(f, "\n\nCaused by:\n ")?;
if chain.peek().is_some() {
write!(f, "{}: ", n)?;
if f.alternate() {
for cause in self.chain().skip(1) {
write!(f, ": {}", cause)?;
self.print_chain(f)?;
writeln!(f)?;
writeln!(f, "{}", self.error())?;
let mut chain = self.chain().skip(1).enumerate().peekable();
if let Some((n, error)) = chain.next() {
write!(f, "\nCaused by:\n ")?;
if chain.peek().is_some() {
write!(f, "{}: ", n)?;
}
writeln!(f, "{}", error)?;
for (n, error) in chain {
writeln!(f, " {}: {}", n, error)?;
}
}