This commit is contained in:
parent
25ae91f0d2
commit
2fb9fe9e86
@ -3,6 +3,7 @@
|
||||
use std::error::Error;
|
||||
use std::fmt::Display;
|
||||
|
||||
use crate::atomic::*;
|
||||
use crate::mode::*;
|
||||
use crate::rcore::*;
|
||||
use crate::rstd::inlining::static_pair::*;
|
||||
@ -87,3 +88,22 @@ where
|
||||
(self.0.factory(), self.1.factory())
|
||||
}
|
||||
}
|
||||
|
||||
impl<A: AtomicBase + ParseMode, B: AtomicBase + ParseMode> StaticPairAtomic for (A, B) {
|
||||
type A = A;
|
||||
type B = B;
|
||||
|
||||
type AParseError = PairParseError<A::AParseError, B::AParseError>;
|
||||
|
||||
fn from_parsed(a: Self::A, b: Self::B) -> Result<Self, Self::AParseError> {
|
||||
Ok((a, b))
|
||||
}
|
||||
|
||||
fn from_error_a(error: AParseError<Self::A>) -> Self::AParseError {
|
||||
PairParseError::A(error)
|
||||
}
|
||||
|
||||
fn from_error_b(error: AParseError<Self::B>) -> Self::AParseError {
|
||||
PairParseError::B(error)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user