mirror of
https://github.com/Drop-OSS/drop-app.git
synced 2025-11-16 09:41:17 +10:00
156 refactor into workspaces (#157)
* 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>
This commit is contained in:
29
src-tauri/games/src/downloads/error.rs
Normal file
29
src-tauri/games/src/downloads/error.rs
Normal file
@ -0,0 +1,29 @@
|
||||
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"
|
||||
)
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user