mirror of
https://github.com/alterware/alterware-launcher.git
synced 2025-12-04 07:17:50 +00:00
misc
- reduce github calls - latest_tag returns full tag - rev_to_int default to 0 on strip_prefix - lint
This commit is contained in:
@@ -13,5 +13,8 @@ pub fn stdin() -> String {
|
||||
}
|
||||
|
||||
pub fn rev_to_int(rev: &str) -> u16 {
|
||||
rev.strip_prefix('r').unwrap().parse::<u16>().unwrap_or(0)
|
||||
rev.strip_prefix('r')
|
||||
.unwrap_or("0")
|
||||
.parse::<u16>()
|
||||
.unwrap_or(0)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user