mirror of
https://github.com/launchbadge/sqlx.git
synced 2026-03-19 08:39:44 +00:00
fix: audit sqlx_postgres::type::int for bad casts
This commit is contained in:
@@ -71,6 +71,8 @@ impl Decode<'_, Postgres> for i8 {
|
||||
return Ok(i8::from_str_radix(text.trim_start_matches('\\'), 8)?);
|
||||
}
|
||||
|
||||
// Wrapping is the whole idea.
|
||||
#[allow(clippy::cast_possible_wrap)]
|
||||
Ok(text.as_bytes()[0] as i8)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user