Skip to content

Commit

Permalink
..
Browse files Browse the repository at this point in the history
  • Loading branch information
shanliu committed Feb 3, 2024
1 parent 282ade4 commit 3d326ae
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions server/lsys-web/src/utils/fluents.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,19 +192,19 @@ impl FluentFormat for sqlx::Error {
}
}
macro_rules! crate_error_fluent {
($crate_error:ty,$code:literal) => {
($crate_error:ty) => {
impl FluentFormat for $crate_error {
fn fluent_format(&self, fluent: &FluentBundle) -> String {
fluent.format_message(&self.to_string().into())
}
}
};
}
crate_error_fluent!(config::ConfigError, "config");
crate_error_fluent!(std::io::Error, "io");
crate_error_fluent!(tera::Error, "tera");
crate_error_fluent!(lsys_docs::gitError, "git");
crate_error_fluent!(redis::RedisError, "redis");
crate_error_fluent!(deadpool_redis::PoolError, "redis");
crate_error_fluent!(serde_json::Error, "serde");
crate_error_fluent!(ParseIntError, "parse");
crate_error_fluent!(config::ConfigError);
crate_error_fluent!(std::io::Error);
crate_error_fluent!(tera::Error);
crate_error_fluent!(lsys_docs::gitError);
crate_error_fluent!(redis::RedisError);
crate_error_fluent!(deadpool_redis::PoolError);
crate_error_fluent!(serde_json::Error);
crate_error_fluent!(ParseIntError);

0 comments on commit 3d326ae

Please sign in to comment.