matches: fix: propagate formatting errors
This commit is contained in:
parent
0a67beb76f
commit
24803d8bee
1 changed files with 2 additions and 2 deletions
|
|
@ -19,14 +19,14 @@ impl Display for Match {
|
|||
|
||||
impl Display for Matches {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
writeln!(f, "Matches for pattern {}:", self.pattern);
|
||||
writeln!(f, "Matches for pattern {}:", self.pattern)?;
|
||||
|
||||
for (idx, item) in self.items.iter().enumerate() {
|
||||
if idx > 0 {
|
||||
writeln!(f)?;
|
||||
}
|
||||
|
||||
write!(f, "{}", item);
|
||||
write!(f, "{}", item)?;
|
||||
}
|
||||
write!(f, "{}", "")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue