lib: introduce a VERSION constant, the daemon version
This commit is contained in:
parent
fd86cfccee
commit
4b659bc35a
14
src/lib.rs
14
src/lib.rs
@ -54,6 +54,20 @@ fn setup_panic_hook() {
|
||||
}));
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Version {
|
||||
pub major: u32,
|
||||
pub minor: u32,
|
||||
}
|
||||
|
||||
impl fmt::Display for Version {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
write!(f, "{}.{}", self.major, self.minor)
|
||||
}
|
||||
}
|
||||
|
||||
pub const VERSION: Version = Version { major: 0, minor: 1 };
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum StartupError {
|
||||
Io(io::Error),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user