diff --git a/crates/ruma-identifiers-validation/CHANGELOG.md b/crates/ruma-identifiers-validation/CHANGELOG.md index 6ae5a647..c4fff950 100644 --- a/crates/ruma-identifiers-validation/CHANGELOG.md +++ b/crates/ruma-identifiers-validation/CHANGELOG.md @@ -1,5 +1,9 @@ # [unreleased] +Breaking changes: + +* Fix a typo in a public function name: `user_id::localpart_is_fully_{comforming => conforming}` + # 0.3.0 Breaking changes: diff --git a/crates/ruma-identifiers-validation/src/user_id.rs b/crates/ruma-identifiers-validation/src/user_id.rs index ae20f814..51e2f4e1 100644 --- a/crates/ruma-identifiers-validation/src/user_id.rs +++ b/crates/ruma-identifiers-validation/src/user_id.rs @@ -5,7 +5,7 @@ use crate::{parse_id, Error}; pub fn validate(s: &str) -> Result<(NonZeroU8, bool), Error> { let colon_idx = parse_id(s, &['@'])?; let localpart = &s[1..colon_idx.get() as usize]; - let is_historical = localpart_is_fully_comforming(localpart)?; + let is_historical = localpart_is_fully_conforming(localpart)?; Ok((colon_idx, is_historical)) } @@ -19,7 +19,7 @@ pub fn validate(s: &str) -> Result<(NonZeroU8, bool), Error> { /// localparts. User IDs that don't even meet the historical user ID restrictions exist in the wild /// due to Synapse allowing them over federation. This will likely be fixed in an upcoming room /// version; see . -pub fn localpart_is_fully_comforming(localpart: &str) -> Result { +pub fn localpart_is_fully_conforming(localpart: &str) -> Result { // See https://matrix.org/docs/spec/appendices#user-identifiers let is_fully_conforming = localpart .bytes() diff --git a/crates/ruma-identifiers/src/user_id.rs b/crates/ruma-identifiers/src/user_id.rs index aa3ad0a1..9fa1033e 100644 --- a/crates/ruma-identifiers/src/user_id.rs +++ b/crates/ruma-identifiers/src/user_id.rs @@ -65,7 +65,7 @@ impl UserId { if id_str.starts_with('@') { try_from(id.into()) } else { - let is_fully_conforming = localpart_is_fully_comforming(id_str)?; + let is_fully_conforming = localpart_is_fully_conforming(id_str)?; Ok(Self { full_id: format!("@{}:{}", id_str, server_name).into(), @@ -109,7 +109,7 @@ where common_impls!(UserId, try_from, "a Matrix user ID"); -pub use ruma_identifiers_validation::user_id::localpart_is_fully_comforming; +pub use ruma_identifiers_validation::user_id::localpart_is_fully_conforming; #[cfg(test)] mod tests {