Remove either feature

This commit is contained in:
Jonas Platte 2022-04-14 19:59:54 +02:00 committed by Jonas Platte
parent 6100a0fa12
commit 76478de953
3 changed files with 0 additions and 15 deletions

View File

@ -46,7 +46,6 @@ unstable-msc3554 = ["unstable-msc1767"]
base64 = "0.13.0"
bytes = "1.0.1"
criterion = { version = "0.3.3", optional = true }
either = { version = "1.6.1", optional = true }
form_urlencoded = "1.0.0"
http = { version = "0.2.2", optional = true }
indexmap = { version = "1.6.2", features = ["serde-1"] }

View File

@ -51,18 +51,6 @@ impl RoomOrAliasId {
self.variant() == Variant::RoomAliasId
}
/// Turn this `RoomOrAliasId` into `Either<RoomId, RoomAliasId>`
#[cfg(feature = "either")]
pub fn into_either(self: Box<Self>) -> either::Either<Box<RoomId>, Box<RoomAliasId>> {
let variant = self.variant();
let boxed_str = self.into_owned();
match variant {
Variant::RoomId => either::Either::Left(RoomId::from_box(boxed_str)),
Variant::RoomAliasId => either::Either::Right(RoomAliasId::from_box(boxed_str)),
}
}
fn colon_idx(&self) -> usize {
self.as_str().find(':').unwrap()
}

View File

@ -54,7 +54,6 @@ push-gateway-api-s = ["api", "ruma-push-gateway-api/server"]
push-gateway-api = ["push-gateway-api-c", "push-gateway-api-s"]
# Convenience features
either = ["ruma-common/either"]
rand = ["ruma-common/rand"]
markdown = ["ruma-common/markdown"]
@ -71,7 +70,6 @@ full = [
"federation-api",
"identity-service-api",
"push-gateway-api",
"either",
"rand",
"markdown",
]