diff --git a/src/parser/instruction/encoding/register.rs b/src/parser/instruction/encoding/register.rs index 18fa297..387f504 100644 --- a/src/parser/instruction/encoding/register.rs +++ b/src/parser/instruction/encoding/register.rs @@ -4,7 +4,6 @@ use super::*; use std::str::FromStr; /// A [Register] epresents [one of the MSP430 processor's registers](https://mspgcc.sourceforge.net/manual/x82.html) - #[allow(non_camel_case_types)] #[derive(Clone, Copy, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum Register { @@ -33,7 +32,12 @@ pub enum Register { impl Parsable for Register { fn parse<'text, T>(_: &Parser, stream: &mut T) -> Result where T: crate::TokenStream<'text> { - stream.expect(Type::Register).map_err(|e| e.context(stream.context()))?.lexeme().parse() + stream + .expect(Type::Register) + .map_err(|e: Error| e.context(stream.context()))? + .lexeme() + .parse() + .map_err(|e: Error| e.context(stream.context())) } }