mirror of
https://github.com/OpenListTeam/OpenList-Desktop.git
synced 2025-11-25 11:18:32 +08:00
refactor: optimize string creation in get_current_platform function
This commit is contained in:
@@ -70,10 +70,10 @@ fn get_current_platform() -> String {
|
||||
let os = env::consts::OS;
|
||||
|
||||
match os {
|
||||
"windows" => format!("pc-windows-msvc"),
|
||||
"macos" => format!("apple-darwin"),
|
||||
"linux" => format!("unknown-linux-gnu"),
|
||||
_ => format!("{os}"),
|
||||
"windows" => "pc-windows-msvc".to_string(),
|
||||
"macos" => "apple-darwin".to_string(),
|
||||
"linux" => "unknown-linux-gnu".to_string(),
|
||||
_ => os.to_string(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user