diff --git a/changelog/@unreleased/pr-300.v2.yml b/changelog/@unreleased/pr-300.v2.yml new file mode 100644 index 00000000..4406f780 --- /dev/null +++ b/changelog/@unreleased/pr-300.v2.yml @@ -0,0 +1,5 @@ +type: feature +feature: + description: Fix the build + links: + - https://github.com/palantir/conjure-rust/pull/300 diff --git a/conjure-codegen/src/context.rs b/conjure-codegen/src/context.rs index 75b0c5ca..df78befe 100644 --- a/conjure-codegen/src/context.rs +++ b/conjure-codegen/src/context.rs @@ -1091,7 +1091,7 @@ impl Context { .cloned() .or_else(|| self.type_log_safety(f.type_())) }) - .fold(Some(LogSafety::Safe), |a, b| self.combine_safety(a, b)), + .try_fold(LogSafety::Safe, |a, b| self.combine_safety(Some(a), b)), TypeDefinition::Union(union_) => union_ .union_() .iter() diff --git a/conjure-object/src/double_key.rs b/conjure-object/src/double_key.rs index 5dd162fe..96ee5aa0 100644 --- a/conjure-object/src/double_key.rs +++ b/conjure-object/src/double_key.rs @@ -57,7 +57,7 @@ impl DerefMut for DoubleKey { impl PartialOrd for DoubleKey { #[inline] fn partial_cmp(&self, other: &Self) -> Option { - OrderedFloat(self.0).partial_cmp(&OrderedFloat(other.0)) + Some(self.cmp(other)) } } diff --git a/conjure-object/src/resource_identifier/mod.rs b/conjure-object/src/resource_identifier/mod.rs index 58c1b62c..6f7d5a65 100644 --- a/conjure-object/src/resource_identifier/mod.rs +++ b/conjure-object/src/resource_identifier/mod.rs @@ -217,7 +217,7 @@ impl Eq for ResourceIdentifier {} impl PartialOrd for ResourceIdentifier { #[inline] fn partial_cmp(&self, other: &ResourceIdentifier) -> Option { - self.rid.partial_cmp(&other.rid) + Some(self.cmp(other)) } #[inline]