diff options
Diffstat (limited to 'src-tauri')
-rw-r--r-- | src-tauri/Cargo.lock | 27 | ||||
-rw-r--r-- | src-tauri/Cargo.toml | 2 | ||||
-rw-r--r-- | src-tauri/src/constants.rs | 5 |
3 files changed, 33 insertions, 1 deletions
diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2c04ae71..266d40cc 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -92,6 +92,7 @@ dependencies = [ "anyhow", "async-recursion", "chrono", + "const_format", "game-scanner", "json5", "libthermite", @@ -461,6 +462,26 @@ dependencies = [ ] [[package]] +name = "const_format" +version = "0.2.30" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7309d9b4d3d2c0641e018d449232f2e28f1b22933c137f157d3dbc14228b8c0e" +dependencies = [ + "const_format_proc_macros", +] + +[[package]] +name = "const_format_proc_macros" +version = "0.2.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f47bf7270cf70d370f8f98c1abb6d2d4cf60a6845d30e05bfb90c6568650" +dependencies = [ + "proc-macro2", + "quote", + "unicode-xid", +] + +[[package]] name = "constant_time_eq" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4238,6 +4259,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] +name = "unicode-xid" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" + +[[package]] name = "untrusted" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d88b8231..693aad9a 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -46,6 +46,8 @@ game-scanner = "1.1.4" chrono = "0.4.23" # TypeScript bindings ts-rs = "6.1" +# const formatting +const_format = "0.2.30" [features] # by default Tauri runs in production mode diff --git a/src-tauri/src/constants.rs b/src-tauri/src/constants.rs index 4cc3c204..79c93f61 100644 --- a/src-tauri/src/constants.rs +++ b/src-tauri/src/constants.rs @@ -1,6 +1,9 @@ // This file stores various global constants values -pub const APP_USER_AGENT: &str = "R2NorthstarTools/FlightCore"; +use const_format::concatcp; + +// FlightCore user agent for web requests +pub const APP_USER_AGENT: &str = concatcp!("FlightCore/", env!("CARGO_PKG_VERSION")); // URL of the Northstar masterserver pub const MASTER_SERVER_URL: &str = "https://northstar.tf"; |