xila/
about.rs

1pub const fn get_major_version() -> u8 {
2    match u8::from_str_radix(env!("CARGO_PKG_VERSION_MAJOR"), 10) {
3        Ok(version) => version,
4        Err(_) => panic!("Failed to parse major version"),
5    }
6}
7
8pub const fn get_minor_version() -> u8 {
9    match u8::from_str_radix(env!("CARGO_PKG_VERSION_MINOR"), 10) {
10        Ok(version) => version,
11        Err(_) => panic!("Failed to parse minor version"),
12    }
13}
14
15pub const fn get_patch_version() -> u8 {
16    match u8::from_str_radix(env!("CARGO_PKG_VERSION_PATCH"), 10) {
17        Ok(version) => version,
18        Err(_) => panic!("Failed to parse patch version"),
19    }
20}
21
22pub const fn get_version_string() -> &'static str {
23    env!("CARGO_PKG_VERSION")
24}
25
26pub const fn get_authors() -> &'static str {
27    env!("CARGO_PKG_AUTHORS")
28}
29
30pub const fn get_license() -> &'static str {
31    env!("CARGO_PKG_LICENSE")
32}
33
34pub const fn get_description() -> &'static str {
35    env!("CARGO_PKG_DESCRIPTION")
36}