mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 18:58:36 +00:00
Remove thiserror dependency
Uses derive_more instead
This commit is contained in:
parent
58242676f6
commit
a942ed0852
5 changed files with 17 additions and 19 deletions
|
@ -25,5 +25,5 @@ i-slint-compiler = { workspace = true, features = ["default", "rust", "display-d
|
|||
i-slint-core-macros = { workspace = true }
|
||||
|
||||
spin_on = { workspace = true }
|
||||
thiserror = "1"
|
||||
toml_edit = { workspace = true }
|
||||
derive_more = { workspace = true, features = ["std", "error"] }
|
||||
|
|
|
@ -192,17 +192,17 @@ impl CompilerConfiguration {
|
|||
}
|
||||
|
||||
/// Error returned by the `compile` function
|
||||
#[derive(thiserror::Error, Debug)]
|
||||
#[derive(derive_more::Error, derive_more::Display, Debug)]
|
||||
#[non_exhaustive]
|
||||
pub enum CompileError {
|
||||
/// Cannot read environment variable CARGO_MANIFEST_DIR or OUT_DIR. The build script need to be run via cargo.
|
||||
#[error("Cannot read environment variable CARGO_MANIFEST_DIR or OUT_DIR. The build script need to be run via cargo.")]
|
||||
#[display("Cannot read environment variable CARGO_MANIFEST_DIR or OUT_DIR. The build script need to be run via cargo.")]
|
||||
NotRunViaCargo,
|
||||
/// Parse error. The error are printed in the stderr, and also are in the vector
|
||||
#[error("{0:?}")]
|
||||
CompileError(Vec<String>),
|
||||
#[display("{_0:?}")]
|
||||
CompileError(#[error(not(source))] Vec<String>),
|
||||
/// Cannot write the generated file
|
||||
#[error("Cannot write the generated file: {0}")]
|
||||
#[display("Cannot write the generated file: {_0}")]
|
||||
SaveError(std::io::Error),
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue