mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-15 17:21:19 +10:00
* chore: Major refactoring Still needs a massive go-over because there shouldn't be anything referencing tauri in any of the workspaces except the original one. Process manager has been refactored as an example Signed-off-by: quexeky <git@quexeky.dev> * fix: Remote tauri dependency from process Signed-off-by: quexeky <git@quexeky.dev> * refactor: Improvements to src-tauri Signed-off-by: quexeky <git@quexeky.dev> * refactor: Builds, but some logic still left to move back Signed-off-by: quexeky <git@quexeky.dev> * refactor: Finish refactor Signed-off-by: quexeky <git@quexeky.dev> * chore: Run cargo clippy && cargo fmt Signed-off-by: quexeky <git@quexeky.dev> * refactor: Move everything into src-tauri Signed-off-by: quexeky <git@quexeky.dev> --------- Signed-off-by: quexeky <git@quexeky.dev>
30 lines
830 B
Rust
30 lines
830 B
Rust
use std::fmt::Display;
|
|
|
|
use serde_with::SerializeDisplay;
|
|
|
|
#[derive(SerializeDisplay)]
|
|
pub enum LibraryError {
|
|
MetaNotFound(String),
|
|
VersionNotFound(String),
|
|
}
|
|
impl Display for LibraryError {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
write!(
|
|
f,
|
|
"{}",
|
|
match self {
|
|
LibraryError::MetaNotFound(id) => {
|
|
format!(
|
|
"Could not locate any installed version of game ID {id} in the database"
|
|
)
|
|
}
|
|
LibraryError::VersionNotFound(game_id) => {
|
|
format!(
|
|
"Could not locate any installed version for game id {game_id} in the database"
|
|
)
|
|
}
|
|
}
|
|
)
|
|
}
|
|
}
|