parsers: clippy run

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2025-04-07 21:53:22 +02:00
commit 1b635854ad
8 changed files with 21 additions and 20 deletions

View file

@ -320,15 +320,11 @@ pub struct StreamError {
impl fmt::Display for StreamError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
<DefinedCondition as fmt::Display>::fmt(&self.condition, f)?;
match self.text {
Some((_, ref text)) => write!(f, " ({:?})", text)?,
None => (),
};
match self.application_specific.get(0) {
Some(cond) => {
f.write_str(&String::from(cond))?;
}
None => (),
if let Some((_, ref text)) = self.text {
write!(f, " ({:?})", text)?
}
if let Some(cond) = self.application_specific.first() {
f.write_str(&String::from(cond))?;
}
Ok(())
}