diff --git a/src/parser.rs b/src/parser.rs index c9f96c4..9fac27b 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -386,10 +386,7 @@ impl<'t, 'contents> Parser<'t, 'contents> { TokenKind::Identifier => Ok(()), TokenKind::DecimalIntLiteral => ReportKind::SyntaxError .new("Expected register starting with r") - .with_note(format!( - "HINT: You forgot the r prefix. Do: r{}", - self.current.text - )) + .with_note(format!("HINT: You forgot the r prefix. Do: r{}", self.current.text)) .with_label(ReportLabel::new(self.current.span.clone())) .into(), _ => ReportKind::UnexpectedToken @@ -412,9 +409,7 @@ impl<'t, 'contents> Parser<'t, 'contents> { IntErrorKind::Empty => ReportKind::SyntaxError .new("Expected register identifier after r prefix") .with_label(ReportLabel::new(self.current.span.clone())) - .with_note( - "HINT: Registers follow the format r. e.g r8 r32", - ), + .with_note("HINT: Registers follow the format r. e.g r8 r32"), IntErrorKind::InvalidDigit => { let mut span = self.current.span.clone(); span.start_index += 1; @@ -423,16 +418,15 @@ impl<'t, 'contents> Parser<'t, 'contents> { ReportKind::SyntaxError .new("Register number contains an invalid digit") .with_label(ReportLabel::new(self.current.span.clone())) - .with_note( - "HINT: Registers follow the format r. e.g r8 r32", - ) + .with_note("HINT: Registers follow the format r. e.g r8 r32") }, _ => ReportKind::SyntaxError .new("Register identifier intager overflows") .with_label(ReportLabel::new(self.current.span.clone())) .with_note("HINT: You dont have this many registers. Trust me"), - }.into(), - Ok(i) => Ok(Type::Register { inner: inner.map(|t| Box::new(t)), ident: i }) + } + .into(), + Ok(i) => Ok(Type::Register { inner: inner.map(|t| Box::new(t)), ident: i }), } }