diff --git a/sqlx-core/src/postgres/message/parse.rs b/sqlx-core/src/postgres/message/parse.rs index 2763bb9b..2e3576de 100644 --- a/sqlx-core/src/postgres/message/parse.rs +++ b/sqlx-core/src/postgres/message/parse.rs @@ -27,7 +27,7 @@ impl Encode<'_> for Parse<'_> { buf.put_str_nul(self.query); // TODO: Return an error here instead - assert!(self.param_types.len() <= (i16::MAX as usize)); + assert!(self.param_types.len() <= (u16::MAX as usize)); buf.extend(&(self.param_types.len() as i16).to_be_bytes()); diff --git a/tests/sqlite/derives.rs b/tests/sqlite/derives.rs index fa725de1..bbbc3d67 100644 --- a/tests/sqlite/derives.rs +++ b/tests/sqlite/derives.rs @@ -4,8 +4,8 @@ use sqlx_test::{new, test_type}; #[derive(Debug, PartialEq, sqlx::Type)] #[repr(u32)] enum Origin { - Foo = 1, - Bar = 2, + Foo = 1, + Bar = 2, } test_type!(origin_enum(Sqlite,