Skip to content

Commit

Permalink
Use derive for PartialEq
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Nov 19, 2023
1 parent 3dd8b30 commit 2217e1c
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/vector.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use std::cmp::PartialEq;

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

Expand All @@ -13,7 +11,7 @@ use diesel::{deserialize::FromSqlRow, expression::AsExpression};
use serde::{Deserialize, Serialize};

/// A vector.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "diesel", derive(FromSqlRow, AsExpression))]
#[cfg_attr(feature = "diesel", diesel(sql_type = VectorType))]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
Expand Down Expand Up @@ -60,12 +58,6 @@ impl Vector {
}
}

impl PartialEq for Vector {
fn eq(&self, other: &Self) -> bool {
self.0 == other.0
}
}

#[cfg(test)]
mod tests {
use crate::Vector;
Expand Down

0 comments on commit 2217e1c

Please sign in to comment.