Change summary
parsers/src/bob.rs | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Detailed changes
@@ -26,11 +26,15 @@ impl FromStr for ContentId {
type Err = Error;
fn from_str(s: &str) -> Result<Self, Error> {
- let (lhs, rhs) = s.split_once('@').ok_or(Error::Other("Missing @ in cid URI."))?;
+ let (lhs, rhs) = s
+ .split_once('@')
+ .ok_or(Error::Other("Missing @ in cid URI."))?;
if rhs != "bob.xmpp.org" {
return Err(Error::Other("Wrong domain for cid URI."));
}
- let (algo, hex) = lhs.split_once('+').ok_or(Error::Other("Missing + in cid URI."))?;
+ let (algo, hex) = lhs
+ .split_once('+')
+ .ok_or(Error::Other("Missing + in cid URI."))?;
let algo = match algo {
"sha1" => Algo::Sha_1,
"sha256" => Algo::Sha_256,