identifiers: Implement TryFrom<&str> for MatrixToUri
This commit is contained in:
parent
f6f3ce074b
commit
e9be719a33
@ -226,6 +226,14 @@ impl fmt::Display for MatrixToUri {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<&str> for MatrixToUri {
|
||||
type Error = Error;
|
||||
|
||||
fn try_from(s: &str) -> Result<Self, Self::Error> {
|
||||
Self::parse(s)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use matches::assert_matches;
|
||||
|
Loading…
x
Reference in New Issue
Block a user