File tree 3 files changed +3
-12
lines changed
3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -285,10 +285,7 @@ impl<'a> base::Resolver for Resolver<'a> {
285
285
-> Result < Option < Rc < SyntaxExtension > > , Determinacy > {
286
286
let def = match invoc. kind {
287
287
InvocationKind :: Attr { attr : None , .. } => return Ok ( None ) ,
288
- _ => match self . resolve_invoc_to_def ( invoc, scope, force) {
289
- Ok ( def) => def,
290
- Err ( determinacy) => return Err ( determinacy) ,
291
- } ,
288
+ _ => self . resolve_invoc_to_def ( invoc, scope, force) ?,
292
289
} ;
293
290
294
291
self . macro_defs . insert ( invoc. expansion_data . mark , def. def_id ( ) ) ;
Original file line number Diff line number Diff line change @@ -1249,10 +1249,7 @@ impl<'a> Parser<'a> {
1249
1249
let mac = respan ( lo. to ( self . prev_span ) , Mac_ { path : pth, tts : tts } ) ;
1250
1250
( keywords:: Invalid . ident ( ) , ast:: TraitItemKind :: Macro ( mac) )
1251
1251
} else {
1252
- let ( constness, unsafety, abi) = match self . parse_fn_front_matter ( ) {
1253
- Ok ( cua) => cua,
1254
- Err ( e) => return Err ( e) ,
1255
- } ;
1252
+ let ( constness, unsafety, abi) = self . parse_fn_front_matter ( ) ?;
1256
1253
1257
1254
let ident = self . parse_ident ( ) ?;
1258
1255
let mut generics = self . parse_generics ( ) ?;
Original file line number Diff line number Diff line change @@ -211,10 +211,7 @@ impl<T: Encodable> Encodable for P<[T]> {
211
211
212
212
impl < T : Decodable > Decodable for P < [ T ] > {
213
213
fn decode < D : Decoder > ( d : & mut D ) -> Result < P < [ T ] > , D :: Error > {
214
- Ok ( P :: from_vec ( match Decodable :: decode ( d) {
215
- Ok ( t) => t,
216
- Err ( e) => return Err ( e)
217
- } ) )
214
+ Ok ( P :: from_vec ( Decodable :: decode ( d) ?) )
218
215
}
219
216
}
220
217
You can’t perform that action at this time.
0 commit comments