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

Commit 71a94463 authored by Henri Chataing's avatar Henri Chataing
Browse files

pdl: Fix cherry-picking conflict with aosp-master

Test: NA
Change-Id: I8b7f7dcde94a03e64b81b9503031d67ae846aef8
Merged-In: Idfbf269d253f93786a63ebdb810c6200da0d2c45
parent 6e1d1d2d
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ pub mod ast {
    use serde::Serialize;

    /// Field and declaration size information.
    #[derive(Debug, Clone, Copy)]
    #[derive(Default, Debug, Clone, Copy)]
    #[allow(unused)]
    pub enum Size {
        /// Constant size in bits.
@@ -21,15 +21,10 @@ pub mod ast {
        Dynamic,
        /// The size cannot be determined statically or at runtime.
        /// The packet assumes the largest possible size.
        #[default]
        Unknown,
    }

    impl Default for Size {
        fn default() -> Size {
            Size::Unknown
        }
    }

    #[derive(Debug, Serialize, Default)]
    pub struct Annotation;

+1 −1
Original line number Diff line number Diff line
use crate::backends::rust::{mask_bits, types, ToUpperCamelCase};
use crate::backends::rust::{mask_bits, types};
use crate::parser::ast as parser_ast;
use crate::{ast, lint};
use quote::{format_ident, quote};
+2 −8
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@ pub mod ast {
    use serde::Serialize;

    // Field and declaration size information.
    #[derive(Debug, Clone)]
    #[derive(Default, Debug, Clone)]
    #[allow(unused)]
    pub enum Size {
        // Constant size in bits.
@@ -17,16 +17,10 @@ pub mod ast {
        Dynamic,
        // The size cannot be determined statically or at runtime.
        // The packet assumes the largest possible size.
        #[default]
        Unknown,
    }

    // TODO: use derive(Default) when UWB is using Rust 1.62.0.
    impl Default for Size {
        fn default() -> Size {
            Size::Unknown
        }
    }

    #[derive(Debug, Serialize)]
    pub struct Annotation();