clippy::complexity fixes
filter_next needless_question_mark bind_instead_of_map manual_find derivable_impls map_identity redundant_slicing skip_while_next unnecessary_unwrap needless_bool
This commit is contained in:
parent
48b3c46126
commit
1da4a49912
15 changed files with 26 additions and 54 deletions
|
@ -488,7 +488,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
|
|||
// If this empty region is from a universe that can
|
||||
// name the placeholder, then the placeholder is
|
||||
// larger; otherwise, the only ancestor is `'static`.
|
||||
if a_ui.can_name(placeholder.universe) { true } else { false }
|
||||
return a_ui.can_name(placeholder.universe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -87,18 +87,12 @@ impl<'tcx> Rollback<UndoLog<'tcx>> for InferCtxtInner<'tcx> {
|
|||
|
||||
/// The combined undo log for all the various unification tables. For each change to the storage
|
||||
/// for any kind of inference variable, we record an UndoLog entry in the vector here.
|
||||
#[derive(Clone)]
|
||||
#[derive(Clone, Default)]
|
||||
pub(crate) struct InferCtxtUndoLogs<'tcx> {
|
||||
logs: Vec<UndoLog<'tcx>>,
|
||||
num_open_snapshots: usize,
|
||||
}
|
||||
|
||||
impl Default for InferCtxtUndoLogs<'_> {
|
||||
fn default() -> Self {
|
||||
Self { logs: Default::default(), num_open_snapshots: Default::default() }
|
||||
}
|
||||
}
|
||||
|
||||
/// The UndoLogs trait defines how we undo a particular kind of action (of type T). We can undo any
|
||||
/// action that is convertible into an UndoLog (per the From impls above).
|
||||
impl<'tcx, T> UndoLogs<T> for InferCtxtUndoLogs<'tcx>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue