Convert format macros to new format

This commit is contained in:
2023-01-17 01:52:31 +01:00
parent 19ba3a750b
commit 1eb31f8e1e
6 changed files with 32 additions and 50 deletions

View File

@@ -147,8 +147,7 @@ impl Language {
.map_err(|e| {
DatabaseError::new(
format!(
"Failed to retrieve language translations: {:?}",
e
"Failed to retrieve language translations: {e:?}"
),
"Database reading failure",
)
@@ -160,7 +159,7 @@ impl Language {
})
.collect::<Vec<Language>>()),
Err(e) => Err(DatabaseError::new(
format!("Failed to connect to the database: {:?}", e),
format!("Failed to connect to the database: {e:?}"),
"Database connection failure",
)
.into()),
@@ -218,14 +217,14 @@ impl Language {
.map_err(|e| {
DatabaseError::new(
format!(
"Failed to retrieve owner {} of language {}: {:?}",
self.owner, self.name, e
"Failed to retrieve owner {} of language {}: {e:?}",
self.owner, self.name
),
"Database reading error",
)
})?),
Err(e) => Err(DatabaseError::new(
format!("Failed to connect to the database: {:?}", e),
format!("Failed to connect to the database: {e:?}"),
"Database connection failure",
)
.into()),