Remove either feature
This commit is contained in:
parent
6100a0fa12
commit
76478de953
@ -46,7 +46,6 @@ unstable-msc3554 = ["unstable-msc1767"]
|
|||||||
base64 = "0.13.0"
|
base64 = "0.13.0"
|
||||||
bytes = "1.0.1"
|
bytes = "1.0.1"
|
||||||
criterion = { version = "0.3.3", optional = true }
|
criterion = { version = "0.3.3", optional = true }
|
||||||
either = { version = "1.6.1", optional = true }
|
|
||||||
form_urlencoded = "1.0.0"
|
form_urlencoded = "1.0.0"
|
||||||
http = { version = "0.2.2", optional = true }
|
http = { version = "0.2.2", optional = true }
|
||||||
indexmap = { version = "1.6.2", features = ["serde-1"] }
|
indexmap = { version = "1.6.2", features = ["serde-1"] }
|
||||||
|
@ -51,18 +51,6 @@ impl RoomOrAliasId {
|
|||||||
self.variant() == Variant::RoomAliasId
|
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 {
|
fn colon_idx(&self) -> usize {
|
||||||
self.as_str().find(':').unwrap()
|
self.as_str().find(':').unwrap()
|
||||||
}
|
}
|
||||||
|
@ -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"]
|
push-gateway-api = ["push-gateway-api-c", "push-gateway-api-s"]
|
||||||
|
|
||||||
# Convenience features
|
# Convenience features
|
||||||
either = ["ruma-common/either"]
|
|
||||||
rand = ["ruma-common/rand"]
|
rand = ["ruma-common/rand"]
|
||||||
markdown = ["ruma-common/markdown"]
|
markdown = ["ruma-common/markdown"]
|
||||||
|
|
||||||
@ -71,7 +70,6 @@ full = [
|
|||||||
"federation-api",
|
"federation-api",
|
||||||
"identity-service-api",
|
"identity-service-api",
|
||||||
"push-gateway-api",
|
"push-gateway-api",
|
||||||
"either",
|
|
||||||
"rand",
|
"rand",
|
||||||
"markdown",
|
"markdown",
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user