diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-07-17 19:42:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-17 19:42:28 +0200 |
commit | 5d679ca8cdc2e79b6e6db7dd7ca2fc099da5a709 (patch) | |
tree | b0aedd69594484d3e263c88a43e29942069a8390 /src-tauri | |
parent | c8be2cc35d9440260e57c1169a8bffc81f16c2e9 (diff) | |
download | FlightCore-5d679ca8cdc2e79b6e6db7dd7ca2fc099da5a709.tar.gz FlightCore-5d679ca8cdc2e79b6e6db7dd7ca2fc099da5a709.zip |
feat: Implement `to_string` for `ParsedThunderstoreModString` (#420)
Allows printing `ParsedThunderstoreModString` in the Thunderstore mod
string format
Diffstat (limited to 'src-tauri')
-rw-r--r-- | src-tauri/src/mod_management/mod.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src-tauri/src/mod_management/mod.rs b/src-tauri/src/mod_management/mod.rs index a2aca85a..6c45a23b 100644 --- a/src-tauri/src/mod_management/mod.rs +++ b/src-tauri/src/mod_management/mod.rs @@ -36,6 +36,12 @@ impl std::str::FromStr for ParsedThunderstoreModString { } } +impl ToString for ParsedThunderstoreModString { + fn to_string(&self) -> String { + format!("{}-{}-{}", self.author_name, self.mod_name, self.version) + } +} + #[derive(Serialize, Deserialize, Debug, Clone)] pub struct ThunderstoreManifest { name: String, |