1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//!
//! The zkEVM LLVM build type.
//!

///
/// The zkEVM LLVM build type.
///
#[derive(Debug)]
pub enum BuildType {
    /// The debug build.
    Debug,
    /// The release build.
    Release,
}

impl From<bool> for BuildType {
    fn from(is_debug: bool) -> Self {
        if is_debug {
            Self::Debug
        } else {
            Self::Release
        }
    }
}

impl std::fmt::Display for BuildType {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Debug => write!(f, "Debug"),
            Self::Release => write!(f, "Release"),
        }
    }
}