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

Commit 3b2edd96 authored by Charisee Chiw's avatar Charisee Chiw Committed by Automerger Merge Worker
Browse files

Merge "Change request for Rust v1.68.0" am: fa93e336 am: bb4cf7a5 am: b4f7f9b7

parents 1f25d630 b4f7f9b7
Loading
Loading
Loading
Loading
+2 −7
Original line number Diff line number Diff line
@@ -100,22 +100,17 @@ where
/// An interface can promise to be a stable vendor interface ([`Vintf`]), or
/// makes no stability guarantees ([`Local`]). [`Local`] is
/// currently the default stability.
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord)]
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Default)]
pub enum Stability {
    /// Default stability, visible to other modules in the same compilation
    /// context (e.g. modules on system.img)
    #[default]
    Local,

    /// A Vendor Interface Object, which promises to be stable
    Vintf,
}

impl Default for Stability {
    fn default() -> Self {
        Stability::Local
    }
}

impl From<Stability> for i32 {
    fn from(stability: Stability) -> i32 {
        use Stability::*;