Skip to content

Commit a8a153b

Browse files
committed
don't use question mark operator on Err(), return the Result directly instead.
1 parent 0eb878d commit a8a153b

File tree

1 file changed

+1
-1
lines changed
  • src/librustc_save_analysis

1 file changed

+1
-1
lines changed

src/librustc_save_analysis/sig.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ impl Sig for ast::Item {
430430
sig.text.push_str(" = ");
431431
let ty = match ty {
432432
Some(ty) => ty.make(offset + sig.text.len(), id, scx)?,
433-
None => Err("Ty")?,
433+
None => return Err("Ty"),
434434
};
435435
sig.text.push_str(&ty.text);
436436
sig.text.push(';');

0 commit comments

Comments
 (0)