diff --git a/src/types/from_sql.rs b/src/types/from_sql.rs index 0f072c9..0f3b63a 100644 --- a/src/types/from_sql.rs +++ b/src/types/from_sql.rs @@ -177,7 +177,7 @@ impl FromSql for std::sync::Arc { impl FromSql for Vec { #[inline] fn column_result(value: ValueRef<'_>) -> FromSqlResult { - value.as_blob().map(|b| b.to_vec()) + value.as_blob().map(<[u8]>::to_vec) } } diff --git a/src/types/time.rs b/src/types/time.rs index bc600a9..4e2811e 100644 --- a/src/types/time.rs +++ b/src/types/time.rs @@ -47,7 +47,7 @@ impl FromSql for OffsetDateTime { len if len <= 19 => { // TODO YYYY-MM-DDTHH:MM:SS PrimitiveDateTime::parse(s, &PRIMITIVE_SHORT_DATE_TIME_FORMAT) - .map(|d| d.assume_utc()) + .map(PrimitiveDateTime::assume_utc) } _ if s.as_bytes()[19] == b':' => { // legacy @@ -56,7 +56,7 @@ impl FromSql for OffsetDateTime { _ if s.as_bytes()[19] == b'.' => OffsetDateTime::parse(s, &OFFSET_DATE_TIME_FORMAT) .or_else(|err| { PrimitiveDateTime::parse(s, &PRIMITIVE_DATE_TIME_FORMAT) - .map(|d| d.assume_utc()) + .map(PrimitiveDateTime::assume_utc) .map_err(|_| err) }), _ => OffsetDateTime::parse(s, &OFFSET_SHORT_DATE_TIME_FORMAT),