1
Fork 0

don't use question mark operator on Err(), return the Result directly instead.

This commit is contained in:
Matthias Krüger 2020-02-29 02:48:27 +01:00
parent 0eb878d2aa
commit a8a153b1a9

View file

@ -430,7 +430,7 @@ impl Sig for ast::Item {
sig.text.push_str(" = ");
let ty = match ty {
Some(ty) => ty.make(offset + sig.text.len(), id, scx)?,
None => Err("Ty")?,
None => return Err("Ty"),
};
sig.text.push_str(&ty.text);
sig.text.push(';');