Skip to content

Commit

Permalink
avoid integer cast in ToSql::<Array<_>, Pg>
Browse files Browse the repository at this point in the history
  • Loading branch information
guissalustiano committed Aug 14, 2024
1 parent bce4881 commit 454f82e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion diesel/src/pg/types/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ where
out.write_i32::<NetworkEndian>(flags)?;
let element_oid = Pg::metadata(out.metadata_lookup()).oid()?;
out.write_u32::<NetworkEndian>(element_oid)?;
out.write_i32::<NetworkEndian>(self.len() as i32)?;
out.write_i32::<NetworkEndian>(self.len().try_into()?)?;
let lower_bound = 1;
out.write_i32::<NetworkEndian>(lower_bound)?;

Expand Down

0 comments on commit 454f82e

Please sign in to comment.