Avoid specialization for the Span Encodable and Decodable impls
This commit is contained in:
parent
1c20462338
commit
6ed37bdc42
16 changed files with 140 additions and 94 deletions
|
@ -16,7 +16,7 @@ pub use index_map::SortedIndexMultiMap;
|
|||
/// stores data in a more compact way. It also supports accessing contiguous
|
||||
/// ranges of elements as a slice, and slices of already sorted elements can be
|
||||
/// inserted efficiently.
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable, Decodable)]
|
||||
#[derive(Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Encodable_Generic, Decodable_Generic)]
|
||||
pub struct SortedMap<K, V> {
|
||||
data: Vec<(K, V)>,
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ use std::fmt;
|
|||
|
||||
use crate::stable_hasher;
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable, Decodable, Hash)]
|
||||
#[derive(Copy, Clone, PartialEq, Eq, Debug, Encodable_Generic, Decodable_Generic, Hash)]
|
||||
pub struct Svh {
|
||||
hash: Fingerprint,
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ trait UnordCollection {}
|
|||
///
|
||||
/// See [MCP 533](https://github.com/rust-lang/compiler-team/issues/533)
|
||||
/// for more information.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable, Decodable)]
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable_Generic, Decodable_Generic)]
|
||||
pub struct UnordSet<V: Eq + Hash> {
|
||||
inner: FxHashSet<V>,
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ impl<HCX, V: Hash + Eq + HashStable<HCX>> HashStable<HCX> for UnordSet<V> {
|
|||
///
|
||||
/// See [MCP 533](https://github.com/rust-lang/compiler-team/issues/533)
|
||||
/// for more information.
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable, Decodable)]
|
||||
#[derive(Debug, Eq, PartialEq, Clone, Encodable_Generic, Decodable_Generic)]
|
||||
pub struct UnordMap<K: Eq + Hash, V> {
|
||||
inner: FxHashMap<K, V>,
|
||||
}
|
||||
|
@ -558,7 +558,7 @@ impl<HCX, K: Hash + Eq + HashStable<HCX>, V: HashStable<HCX>> HashStable<HCX> fo
|
|||
///
|
||||
/// See [MCP 533](https://github.com/rust-lang/compiler-team/issues/533)
|
||||
/// for more information.
|
||||
#[derive(Default, Debug, Eq, PartialEq, Clone, Encodable, Decodable)]
|
||||
#[derive(Default, Debug, Eq, PartialEq, Clone, Encodable_Generic, Decodable_Generic)]
|
||||
pub struct UnordBag<V> {
|
||||
inner: Vec<V>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue