diff --git a/src/db.rs b/src/db.rs index 252dda9..8516434 100644 --- a/src/db.rs +++ b/src/db.rs @@ -7,14 +7,15 @@ use chrono::{DateTime, NaiveDateTime, Utc}; use rand_core::{OsRng, RngCore}; use serde::Serialize; use sqlx::FromRow; -use sqlx::{Any, AnyRow, Row, Transaction}; - +use sqlx::{Any, Row, Transaction, any::AnyRow}; fn any_text(row: &AnyRow, column: &str) -> Result { match row.try_get::(column) { Ok(value) => Ok(value), Err(string_error) => match row.try_get::, _>(column) { - Ok(value) => String::from_utf8(value).map_err(|error| sqlx::Error::Decode(Box::new(error))), + Ok(value) => { + String::from_utf8(value).map_err(|error| sqlx::Error::Decode(Box::new(error))) + } Err(_) => Err(string_error), }, }