Make Either private

This commit is contained in:
asonix 2020-05-16 15:40:41 -05:00
parent 4e22ce7923
commit 2fb52d32bb
3 changed files with 2 additions and 9 deletions

View file

@ -30,11 +30,4 @@ impl<L, R> Either<L, R> {
Either::Right(ref r) => Either::Right(r),
}
}
pub fn as_mut(&mut self) -> Either<&mut L, &mut R> {
match self {
Either::Left(ref mut l) => Either::Left(l),
Either::Right(ref mut r) => Either::Right(r),
}
}
}

View file

@ -253,7 +253,7 @@ pub mod activity;
pub mod actor;
pub mod base;
pub mod collection;
pub mod either;
mod either;
pub mod link;
pub mod object;
pub mod primitives;

View file

@ -62,7 +62,7 @@ pub struct Unit(Either<Length, XsdString>);
/// ```
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[serde(transparent)]
pub struct OneOrMany<T>(pub Either<T, Vec<T>>);
pub struct OneOrMany<T>(pub(crate) Either<T, Vec<T>>);
impl AnyString {
/// Borrow the AnyString as an XsdString