Skip to content

Commit

Permalink
Fixed warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Sep 30, 2023
1 parent fad63a6 commit 1b0b522
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/vector.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use std::cmp::PartialEq;

#[cfg(any(feature = "postgres", feature = "sqlx", feature = "diesel"))]
use std::convert::TryInto;

#[cfg(feature = "diesel")]
use crate::diesel_ext::VectorType;

Expand Down Expand Up @@ -27,8 +30,6 @@ impl Vector {

#[cfg(any(feature = "postgres", feature = "sqlx", feature = "diesel"))]
pub(crate) fn from_sql(buf: &[u8]) -> Result<Vector, Box<dyn std::error::Error + Sync + Send>> {
use std::convert::TryInto;

let dim = u16::from_be_bytes(buf[0..2].try_into()?) as usize;
let unused = u16::from_be_bytes(buf[2..4].try_into()?);
if unused != 0 {
Expand Down

0 comments on commit 1b0b522

Please sign in to comment.