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
|
@ -10,7 +10,7 @@ use arrayvec::ArrayVec;
|
|||
use smallvec::{smallvec, SmallVec};
|
||||
|
||||
#[cfg(feature = "nightly")]
|
||||
use rustc_macros::{Decodable, Encodable};
|
||||
use rustc_macros::{Decodable_Generic, Encodable_Generic};
|
||||
|
||||
use crate::{Idx, IndexVec};
|
||||
|
||||
|
@ -112,7 +112,7 @@ macro_rules! bit_relations_inherent_impls {
|
|||
/// to or greater than the domain size. All operations that involve two bitsets
|
||||
/// will panic if the bitsets have differing domain sizes.
|
||||
///
|
||||
#[cfg_attr(feature = "nightly", derive(Decodable, Encodable))]
|
||||
#[cfg_attr(feature = "nightly", derive(Decodable_Generic, Encodable_Generic))]
|
||||
#[derive(Eq, PartialEq, Hash)]
|
||||
pub struct BitSet<T> {
|
||||
domain_size: usize,
|
||||
|
@ -1590,7 +1590,7 @@ impl<T: Idx> From<BitSet<T>> for GrowableBitSet<T> {
|
|||
///
|
||||
/// All operations that involve a row and/or column index will panic if the
|
||||
/// index exceeds the relevant bound.
|
||||
#[cfg_attr(feature = "nightly", derive(Decodable, Encodable))]
|
||||
#[cfg_attr(feature = "nightly", derive(Decodable_Generic, Encodable_Generic))]
|
||||
#[derive(Clone, Eq, PartialEq, Hash)]
|
||||
pub struct BitMatrix<R: Idx, C: Idx> {
|
||||
num_rows: usize,
|
||||
|
@ -2020,7 +2020,7 @@ impl std::fmt::Debug for FiniteBitSet<u32> {
|
|||
|
||||
/// A fixed-sized bitset type represented by an integer type. Indices outwith than the range
|
||||
/// representable by `T` are considered set.
|
||||
#[cfg_attr(feature = "nightly", derive(Decodable, Encodable))]
|
||||
#[cfg_attr(feature = "nightly", derive(Decodable_Generic, Encodable_Generic))]
|
||||
#[derive(Copy, Clone, Eq, PartialEq)]
|
||||
pub struct FiniteBitSet<T: FiniteBitSetTy>(pub T);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue