Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7dce3f0d authored by Martin Geisler's avatar Martin Geisler
Browse files

pdl: Inline trivial getter of public field

Test: atest pdl_rust_generator_tests_{le,be} pdl_tests
Change-Id: Idd12243687b9d6e1114502db1585884c9858f35a
parent 6cbec1db
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -16,10 +16,6 @@ impl ScalarField {
        ScalarField { id: String::from(id), width }
    }

    fn get_width(&self) -> usize {
        self.width
    }

    fn get_ident(&self) -> proc_macro2::Ident {
        format_ident!("{}", self.id)
    }
@@ -141,7 +137,7 @@ impl From<&ast::Field> for Field {
impl Field {
    pub fn get_width(&self) -> usize {
        match self {
            Field::Scalar(field) => field.get_width(),
            Field::Scalar(field) => field.width,
        }
    }