From 048c324f87e4d4fa5aa3dc40ab722b8370c6b91d Mon Sep 17 00:00:00 2001 From: anthonyray Date: Mon, 23 Mar 2020 13:31:48 +0100 Subject: [PATCH] Refactor trait bounds for CRange to restrict to target types that impl PartialOrd and PartialEq --- ffi-convert/src/types.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffi-convert/src/types.rs b/ffi-convert/src/types.rs index ed9b830..ad03aa1 100644 --- a/ffi-convert/src/types.rs +++ b/ffi-convert/src/types.rs @@ -211,7 +211,7 @@ pub struct CRange { pub end: T, } -impl + PartialOrd, V: PartialOrd> AsRust> for CRange { +impl, V: PartialOrd + PartialEq> AsRust> for CRange { fn as_rust(&self) -> Result, Error> { Ok(Range { start: self.start.as_rust()?, @@ -220,7 +220,7 @@ impl + PartialOrd, V: PartialOrd> AsRust> for CRange { } } -impl + PartialOrd + CDrop, V: PartialOrd> CReprOf> for CRange { +impl + CDrop, V: PartialOrd + PartialEq> CReprOf> for CRange { fn c_repr_of(input: Range) -> Result { Ok(Self { start: U::c_repr_of(input.start)?,