Skip to content

Commit

Permalink
Simplify in Size
Browse files Browse the repository at this point in the history
  • Loading branch information
bluss committed Oct 11, 2016
1 parent 529443d commit d0b9183
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::borrow::Borrow;

use std::cmp::max;
use std::fmt;
use std::mem;
use std::mem::{swap, replace};
use std::marker::PhantomData;

Expand Down Expand Up @@ -361,10 +360,8 @@ impl<K, V, S> OrderMap<K, V, S>
/// size needed to address an entry's indes in self.entries.
trait Size {
fn is_64_bit() -> bool;
fn is_same_size<T>() -> bool
where Self: Sized
{
mem::size_of::<T>() == mem::size_of::<Self>()
fn is_same_size<T: Size>() -> bool {
Self::is_64_bit() == T::is_64_bit()
}
}

Expand Down

0 comments on commit d0b9183

Please sign in to comment.