ruma_identifiers_validation/
room_id_or_alias_id.rsuse crate::Error;
pub fn validate(s: &str) -> Result<(), Error> {
match s.as_bytes().first() {
Some(b'#') => crate::room_alias_id::validate(s),
Some(b'!') => crate::room_id::validate(s),
_ => Err(Error::MissingLeadingSigil),
}
}