Skip to content

Commit

Permalink
fix(all): misc
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Feb 1, 2024
1 parent 84fce55 commit dd9bfe8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions backend/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ pub fn _relative_to_seconds(rel: impl AsRef<str>) -> u64 {
pub fn version_string() -> String {
format!(
r#"{{ "name": "Procchi", "version": "{}.{}.{}", "author": "{}" }}"#,
env!("CARGO_PKG_VERSION_MAJOR"),
env!("CARGO_PKG_VERSION_MINOR"),
env!("CARGO_PKG_VERSION_PATCH"),
env!("CARGO_PKG_AUTHORS")
no_quotes(env!("CARGO_PKG_VERSION_MAJOR")),
no_quotes(env!("CARGO_PKG_VERSION_MINOR")),
no_quotes(env!("CARGO_PKG_VERSION_PATCH")),
no_quotes(env!("CARGO_PKG_AUTHORS"))
)
}

fn no_quotes(s: &str) -> String {
s.replace("\"", "").replace("'", "")
}

0 comments on commit dd9bfe8

Please sign in to comment.