Skip to content

Commit

Permalink
chore: move from #1875
Browse files Browse the repository at this point in the history
  • Loading branch information
indietyp committed Apr 10, 2023
1 parent 9420a82 commit 68a36d4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/deer/src/impls/core.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
mod array;
mod atomic;
mod bool;
mod cmp;
mod floating;
mod integral;
mod non_zero;
Expand Down
16 changes: 16 additions & 0 deletions libs/deer/src/impls/core/cmp.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use core::cmp::{Ordering, Reverse};

use error_stack::Result;

use crate::{
error::{DeserializeError, VisitorError},
Deserialize, Deserializer, Document, Reflection, Schema, Visitor,
};

impl<'de, T: Deserialize<'de>> Deserialize<'de> for Reverse<T> {
type Reflection = T::Reflection;

fn deserialize<D: Deserializer<'de>>(de: D) -> Result<Self, DeserializeError> {
T::deserialize(de).map(Reverse)
}
}

0 comments on commit 68a36d4

Please sign in to comment.