Skip to content

Commit 5469b42

Browse files
committed
clippy
1 parent ccac77c commit 5469b42

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ actix-web-httpauth = "0.8.0"
4646
rand = "0.8.5"
4747

4848
[build-dependencies]
49-
ureq = "2.6.2"
49+
ureq = "2.7.0"

src/webserver/database/mod.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -271,21 +271,19 @@ fn sql_nonnull_to_json<'r>(mut get_ref: impl FnMut() -> sqlx::any::AnyValueRef<'
271271
.into(),
272272
"DATE" => <chrono::NaiveDate as Decode<sqlx::any::Any>>::decode(raw_value)
273273
.as_ref()
274-
.map(ToString::to_string)
275-
.unwrap_or_else(|e| e.to_string())
274+
.map_or_else(std::string::ToString::to_string, ToString::to_string)
276275
.into(),
277276
"TIME" => <chrono::NaiveTime as Decode<sqlx::any::Any>>::decode(raw_value)
278277
.as_ref()
279-
.map(ToString::to_string)
280-
.unwrap_or_else(|e| e.to_string())
278+
.map_or_else(ToString::to_string, ToString::to_string)
281279
.into(),
282280
"DATETIME" | "DATETIME2" | "DATETIMEOFFSET" | "TIMESTAMP" | "TIMESTAMPTZ" => {
283281
try_decode_with!(
284282
get_ref(),
285283
[chrono::NaiveDateTime, chrono::DateTime<chrono::Utc>],
286284
|v| dbg!(v).to_string()
287285
)
288-
.unwrap_or_else(|e| format!("Unable to decode date: {:?}", e))
286+
.unwrap_or_else(|e| format!("Unable to decode date: {e:?}"))
289287
.into()
290288
}
291289
"JSON" | "JSON[]" | "JSONB" | "JSONB[]" => {

0 commit comments

Comments
 (0)