Skip to content

Commit

Permalink
Merge pull request diesel-rs#4166 from guissalustiano/remove_cast_in_…
Browse files Browse the repository at this point in the history
…array

avoid integer cast in `ToSql::<Array<_>, Pg>`
  • Loading branch information
weiznich committed Aug 23, 2024
1 parent f85cb98 commit 060da73
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 060da73

Please sign in to comment.