diff --git a/crates/ruma-common/Cargo.toml b/crates/ruma-common/Cargo.toml index 3cd2ad14..ebf052d3 100644 --- a/crates/ruma-common/Cargo.toml +++ b/crates/ruma-common/Cargo.toml @@ -27,9 +27,7 @@ compat = ["ruma-macros/compat", "ruma-identifiers-validation/compat"] events = ["dep:thiserror"] js = ["dep:js-sys", "getrandom?/js", "uuid?/js"] markdown = ["pulldown-cmark"] -# Dependency should not be renamed, but if it isn't, trybuild breaks: -# https://github.com/dtolnay/trybuild/issues/171 -rand = ["dep:rand_crate", "dep:uuid"] +rand = ["dep:rand", "dep:uuid"] unstable-exhaustive-types = [] unstable-msc1767 = [] unstable-msc2448 = [] @@ -64,7 +62,7 @@ js_option = "0.1.0" percent-encoding = "2.1.0" phf = { version = "0.10.1", features = ["macros"], optional = true } pulldown-cmark = { version = "0.9.1", default-features = false, optional = true } -rand_crate = { package = "rand", version = "0.8.3", optional = true } +rand = { version = "0.8.3", optional = true } regex = { version = "1.5.6", default-features = false, features = ["std", "perf"] } ruma-identifiers-validation = { version = "0.9.0", path = "../ruma-identifiers-validation", default-features = false } ruma-macros = { version = "0.10.3", path = "../ruma-macros" } diff --git a/crates/ruma-common/src/lib.rs b/crates/ruma-common/src/lib.rs index 4ef84a42..98ce6bf3 100644 --- a/crates/ruma-common/src/lib.rs +++ b/crates/ruma-common/src/lib.rs @@ -13,11 +13,6 @@ compile_error!( "ruma_common's `client` and `server` Cargo features only exist as a workaround are not meant to be disabled" ); -// Renamed in `Cargo.toml` so we can features with the same name as the package. -// Rename them back here because the `Cargo.toml` names are ugly. -#[cfg(feature = "rand")] -extern crate rand_crate as rand; - // Hack to allow both ruma-common itself and external crates (or tests) to use procedural macros // that expect `ruma_common` to exist in the prelude. extern crate self as ruma_common;