1
Fork 0

remove useless ?s (clippy::needless_question_marks)

Example code:
```
fn opts() -> Option<String> {
    let s: Option<String> = Some(String::new());
    Some(s?) // this can just be "s"
}
```
This commit is contained in:
Matthias Krüger 2021-02-17 23:23:57 +01:00
parent 5ef21063f0
commit f7b834831f
7 changed files with 11 additions and 18 deletions

View file

@ -118,7 +118,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
.get_raw(vtable_slot.alloc_id)?
.read_ptr_sized(self, vtable_slot)?
.check_init()?;
Ok(self.memory.get_fn(fn_ptr)?)
self.memory.get_fn(fn_ptr)
}
/// Returns the drop fn instance as well as the actual dynamic type.