chore: fix nightly clippy warnings

This commit is contained in:
link2xt
2024-04-10 15:41:48 +00:00
parent bab311730c
commit fbbefe6b49
6 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -1439,7 +1439,7 @@ impl rusqlite::types::ToSql for ChatId {
impl rusqlite::types::FromSql for ChatId {
fn column_result(value: rusqlite::types::ValueRef) -> rusqlite::types::FromSqlResult<Self> {
i64::column_result(value).and_then(|val| {
if 0 <= val && val <= i64::from(std::u32::MAX) {
if 0 <= val && val <= i64::from(u32::MAX) {
Ok(ChatId::new(val as u32))
} else {
Err(rusqlite::types::FromSqlError::OutOfRange(val))