diff options
Diffstat (limited to 'crates/shirabe/src/composer.rs')
| -rw-r--r-- | crates/shirabe/src/composer.rs | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/crates/shirabe/src/composer.rs b/crates/shirabe/src/composer.rs index 7711d7f..56f1d3b 100644 --- a/crates/shirabe/src/composer.rs +++ b/crates/shirabe/src/composer.rs @@ -15,17 +15,17 @@ use crate::repository::RepositoryManager; use crate::util::r#loop::Loop; // TODO: change this information to Shirabe version. -pub const VERSION: &'static str = "2.9.7"; -pub const BRANCH_ALIAS_VERSION: &'static str = ""; -pub const RELEASE_DATE: &'static str = "2026-04-14 13:31:52"; -pub const SOURCE_VERSION: &'static str = ""; -pub const RUNTIME_API_VERSION: &'static str = "2.2.2"; +pub const VERSION: &str = "2.9.7"; +pub const BRANCH_ALIAS_VERSION: &str = ""; +pub const RELEASE_DATE: &str = "2026-04-14 13:31:52"; +pub const SOURCE_VERSION: &str = ""; +pub const RUNTIME_API_VERSION: &str = "2.2.2"; pub fn get_version() -> String { if VERSION == "@package_version@" { return SOURCE_VERSION.to_string(); } - if BRANCH_ALIAS_VERSION != "" && Preg::is_match("{^[a-f0-9]{40}$}", VERSION) { + if !BRANCH_ALIAS_VERSION.is_empty() && Preg::is_match("{^[a-f0-9]{40}$}", VERSION) { return format!("{}+{}", BRANCH_ALIAS_VERSION, VERSION); } VERSION.to_string() @@ -122,6 +122,12 @@ pub struct Composer { archive_manager: Option<std::rc::Rc<std::cell::RefCell<ArchiveManager>>>, } +impl Default for Composer { + fn default() -> Self { + Self::new() + } +} + impl Composer { pub fn new() -> Self { Self { |
