Skip to content

Commit

Permalink
Changed cmp methods to old names
Browse files Browse the repository at this point in the history
  • Loading branch information
gammelalf committed Sep 5, 2023
1 parent 232766b commit 320ae5a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rorm-db
Submodule rorm-db updated 1 files
+5 −2 src/lib.rs
27 changes: 21 additions & 6 deletions src/internal/field/access.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,47 +61,62 @@ pub trait FieldAccess: Sized + Send + 'static {
type Path: Path;

/// Compare the field to another value using `==`
fn eq<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldEq<'rhs, Rhs>>::EqCond<Self>
fn equals<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldEq<'rhs, Rhs>>::EqCond<Self>
where
FieldType!(): FieldEq<'rhs, Rhs>,
{
<FieldType!()>::field_equals(self, rhs)
}

/// Compare the field to another value using `!=`
fn ne<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldEq<'rhs, Rhs>>::NeCond<Self>
fn not_equals<'rhs, Rhs: 'rhs>(
self,
rhs: Rhs,
) -> <FieldType!() as FieldEq<'rhs, Rhs>>::NeCond<Self>
where
FieldType!(): FieldEq<'rhs, Rhs>,
{
<FieldType!()>::field_not_equals(self, rhs)
}

/// Compare the field to another value using `<`
fn lt<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::LtCond<Self>
fn less_than<'rhs, Rhs: 'rhs>(
self,
rhs: Rhs,
) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::LtCond<Self>
where
FieldType!(): FieldOrd<'rhs, Rhs>,
{
<FieldType!()>::field_less_than(self, rhs)
}

/// Compare the field to another value using `<=`
fn le<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::LeCond<Self>
fn less_equals<'rhs, Rhs: 'rhs>(
self,
rhs: Rhs,
) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::LeCond<Self>
where
FieldType!(): FieldOrd<'rhs, Rhs>,
{
<FieldType!()>::field_less_equals(self, rhs)
}

/// Compare the field to another value using `<`
fn gt<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::GtCond<Self>
fn greater_than<'rhs, Rhs: 'rhs>(
self,
rhs: Rhs,
) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::GtCond<Self>
where
FieldType!(): FieldOrd<'rhs, Rhs>,
{
<FieldType!()>::field_greater_than(self, rhs)
}

/// Compare the field to another value using `>=`
fn ge<'rhs, Rhs: 'rhs>(self, rhs: Rhs) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::GeCond<Self>
fn greater_equals<'rhs, Rhs: 'rhs>(
self,
rhs: Rhs,
) -> <FieldType!() as FieldOrd<'rhs, Rhs>>::GeCond<Self>
where
FieldType!(): FieldOrd<'rhs, Rhs>,
{
Expand Down

0 comments on commit 320ae5a

Please sign in to comment.