diff --git a/ruma-api/Cargo.toml b/ruma-api/Cargo.toml index 29b7c425..943b0ec0 100644 --- a/ruma-api/Cargo.toml +++ b/ruma-api/Cargo.toml @@ -19,7 +19,7 @@ edition = "2018" http = "0.2.1" percent-encoding = "2.1.0" ruma-api-macros = { version = "=0.16.1", path = "../ruma-api-macros" } -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers" } ruma-serde = { version = "0.2.0", path = "../ruma-serde" } serde = { version = "1.0.113", features = ["derive"] } serde_json = "1.0.55" diff --git a/ruma-appservice-api/Cargo.toml b/ruma-appservice-api/Cargo.toml index 4901668e..d92118f0 100644 --- a/ruma-appservice-api/Cargo.toml +++ b/ruma-appservice-api/Cargo.toml @@ -14,6 +14,6 @@ edition = "2018" [dependencies] ruma-api = { version = "0.16.1", path = "../ruma-api" } ruma-events = { version = "0.21.3", path = "../ruma-events" } -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers" } serde = { version = "1.0.113", features = ["derive"] } serde_json = "1.0.55" diff --git a/ruma-client-api/Cargo.toml b/ruma-client-api/Cargo.toml index 780d413e..53c8ab4d 100644 --- a/ruma-client-api/Cargo.toml +++ b/ruma-client-api/Cargo.toml @@ -22,7 +22,7 @@ js_int = { version = "0.1.7", features = ["serde"] } ruma-api = { version = "0.16.1", path = "../ruma-api" } ruma-common = { version = "0.1.3", path = "../ruma-common" } ruma-events = { version = "0.21.3", path = "../ruma-events" } -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers" } ruma-serde = { version = "0.2.2", path = "../ruma-serde" } serde = { version = "1.0.113", features = ["derive"] } serde_json = "1.0.55" diff --git a/ruma-events-macros/Cargo.toml b/ruma-events-macros/Cargo.toml index 2ed50284..522fb3b3 100644 --- a/ruma-events-macros/Cargo.toml +++ b/ruma-events-macros/Cargo.toml @@ -22,7 +22,7 @@ matches = "0.1.8" proc-macro = true [dev-dependencies] -ruma-identifiers = { version = "0.16.1", path = "../ruma-identifiers" } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers" } serde_json = "1.0.55" js_int = { version = "0.1.7", features = ["serde"] } serde = { version = "1.0.113", features = ["derive"] } diff --git a/ruma-events/Cargo.toml b/ruma-events/Cargo.toml index 6372cb1e..02538028 100644 --- a/ruma-events/Cargo.toml +++ b/ruma-events/Cargo.toml @@ -17,7 +17,7 @@ criterion = { version = "0.3.2", optional = true } js_int = { version = "0.1.7", features = ["serde"] } ruma-common = { version = "0.1.3", path = "../ruma-common" } ruma-events-macros = { version = "=0.21.3", path = "../ruma-events-macros" } -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers" } ruma-serde = { version = "0.2.2", path = "../ruma-serde" } serde = { version = "1.0.113", features = ["derive"] } serde_json = { version = "1.0.55", features = ["raw_value"] } @@ -26,7 +26,7 @@ strum = { version = "0.18.0", features = ["derive"] } [dev-dependencies] maplit = "1.0.2" matches = "0.1.8" -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers", features = ["rand"] } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers", features = ["rand"] } trybuild = "1.0.30" [[bench]] diff --git a/ruma-federation-api/Cargo.toml b/ruma-federation-api/Cargo.toml index 8365e733..c5a47229 100644 --- a/ruma-federation-api/Cargo.toml +++ b/ruma-federation-api/Cargo.toml @@ -20,7 +20,7 @@ js_int = "0.1.7" matches = "0.1.8" ruma-api = { version = "0.16.1", path = "../ruma-api" } ruma-events = { version = "0.21.3", path = "../ruma-events" } -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers" } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers" } ruma-serde = { version = "0.2.2", path = "../ruma-serde" } serde = { version = "1.0.113", features = ["derive"] } serde_json = "1.0.55" diff --git a/ruma-identifiers/CHANGELOG.md b/ruma-identifiers/CHANGELOG.md index 85890ffb..fe1579e7 100644 --- a/ruma-identifiers/CHANGELOG.md +++ b/ruma-identifiers/CHANGELOG.md @@ -1,5 +1,7 @@ # [unreleased] +# 0.17.0 + Breaking changes: * Remove `RoomVersionId::custom`. It could be used to create invalid room versions (empty or @@ -19,7 +21,7 @@ Breaking changes: ``` to ```rust - fn new(ServerNameRef<'_>) -> Self + fn new(&ServerName) -> Self ``` * Change signature of `server_name()` for `EventId`, `RoomAliasId`, `RoomId`, `RoomIdOrAliasId`, `UserId` from @@ -28,18 +30,21 @@ Breaking changes: ``` to ```rust - fn server_name() -> ServerNameRef<'_> + fn server_name() -> &ServerName ``` +* Change `DeviceId` from being an alias for `String` to being an alias for `str` + * This means any string slice or string literal is a valid `&DeviceId` now + * But to store one, you need to box it: `Box` Deprecations: -* Mark `server_name::is_valid_server_name` as deprecated in favor of `ServerName::try_from()` - +* Mark `server_name::is_valid_server_name` as deprecated in favor of `<&ServerName>::try_from()` Improvements: * Add `DeviceKeyId`, `DeviceKeyAlgorithm`, `ServerKeyId`, and `ServerKeyAlgorithm` -* Add `ServerName` and `ServerNameRef` types +* Add a `ServerName` type + * This is a dynamically-sized type, if you need to store it use `Box` # 0.16.2 diff --git a/ruma-identifiers/Cargo.toml b/ruma-identifiers/Cargo.toml index e1480340..74a4f047 100644 --- a/ruma-identifiers/Cargo.toml +++ b/ruma-identifiers/Cargo.toml @@ -9,7 +9,7 @@ license = "MIT" name = "ruma-identifiers" readme = "README.md" repository = "https://github.com/ruma/ruma-identifiers" -version = "0.16.2" +version = "0.17.0-pre.1" edition = "2018" [package.metadata.docs.rs] diff --git a/ruma/Cargo.toml b/ruma/Cargo.toml index f86208ca..edec030d 100644 --- a/ruma/Cargo.toml +++ b/ruma/Cargo.toml @@ -22,7 +22,7 @@ federation-api = ["ruma-api", "ruma-federation-api", "ruma-signatures"] [dependencies] ruma-common = { version = "0.1.3", path = "../ruma-common" } -ruma-identifiers = { version = "0.16.2", path = "../ruma-identifiers", features = ["serde"] } +ruma-identifiers = { version = "=0.17.0-pre.1", path = "../ruma-identifiers", features = ["serde"] } ruma-events = { version = "0.21.3", path = "../ruma-events", optional = true } ruma-signatures = { version = "0.6.0-dev.1", path = "../ruma-signatures", optional = true }