mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
apply clippy optimizations
This commit is contained in:
parent
dd1411487e
commit
227c9bb246
6 changed files with 9 additions and 9 deletions
|
|
@ -10,7 +10,7 @@ impl Error {
|
|||
Self::Overwrite(key) => {
|
||||
format!("Overwrite attempt for existing record `{key}`")
|
||||
}
|
||||
Self::Unexpected => format!("Unexpected error"),
|
||||
Self::Unexpected => "Unexpected error".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ impl Error {
|
|||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
Self::Database(reason) => {
|
||||
format!("Database error: {}", reason.to_string())
|
||||
format!("Database error: {}", reason)
|
||||
}
|
||||
Self::Gemini(reason) => {
|
||||
format!("Could not init Gemini identity: {}", reason.to_string())
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ pub enum Error {
|
|||
impl Error {
|
||||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
Self::Database(reason) => format!("Database error: {}", reason.to_string()),
|
||||
Self::Database(reason) => format!("Database error: {}", reason),
|
||||
Self::Memory(reason) => format!("Memory error: {}", reason.to_string()),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@ pub enum Error {
|
|||
impl Error {
|
||||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
Self::Clear => format!("Could not cleanup memory index"),
|
||||
Self::Clear => "Could not cleanup memory index".to_string(),
|
||||
Self::Overwrite(key) => {
|
||||
format!("Overwrite attempt for existing record `{key}`")
|
||||
}
|
||||
Self::Unexpected => format!("Unexpected error"),
|
||||
Self::Unexpected => "Unexpected error".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ impl Error {
|
|||
match self {
|
||||
Self::Auth(reason) => format!("Could not create auth: {}", reason.to_string()),
|
||||
Self::Certificate(reason) => {
|
||||
format!("Could not create certificate: {}", reason.to_string())
|
||||
format!("Could not create certificate: {}", reason)
|
||||
}
|
||||
Self::Database(reason) => {
|
||||
format!("Database error: {}", reason.to_string())
|
||||
format!("Database error: {}", reason)
|
||||
}
|
||||
Self::Memory(reason) => format!("Memory error: {}", reason.to_string()),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,14 +9,14 @@ pub enum Error {
|
|||
impl Error {
|
||||
pub fn to_string(&self) -> String {
|
||||
match self {
|
||||
Self::Clear => format!("Could not cleanup memory index"),
|
||||
Self::Clear => "Could not cleanup memory index".to_string(),
|
||||
Self::NotFound(key) => {
|
||||
format!("Record `{key}` not found in memory index")
|
||||
}
|
||||
Self::Overwrite(key) => {
|
||||
format!("Overwrite attempt for existing record `{key}`")
|
||||
}
|
||||
Self::Unexpected => format!("Unexpected error"),
|
||||
Self::Unexpected => "Unexpected error".to_string(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue