diff --git a/components/dada-brew/src/scope.rs b/components/dada-brew/src/scope.rs index a3203f85..ed8f3a9d 100644 --- a/components/dada-brew/src/scope.rs +++ b/components/dada-brew/src/scope.rs @@ -90,14 +90,14 @@ impl Scope<'_> { /// Creates a subscope with the given `cause` that shares the same start block but is now appending /// to `end_block`. It is your reponsibility to connect `end_block` (or some successor of it) back to /// `self.end_block` in this subscope. - pub(crate) fn subscope<'s>( - &'s self, + pub(crate) fn subscope( + &self, end_block: Option, cause: ScopeCause, - ) -> Scope<'s> { + ) -> Scope<'_> { Scope { start_block: self.start_block, - end_block: end_block, + end_block, cause, previous: Some(self), variables: vec![], @@ -167,7 +167,7 @@ impl Scope<'_> { pub(crate) fn push_declared_variables( &mut self, vars: &[validated::LocalVariable], - brewery: &mut Brewery<'_>, + brewery: &Brewery<'_>, ) -> VariableMarker { let marker = self.mark_variables(); for &v in vars { diff --git a/components/dada-execute/src/heap_graph/graphviz.rs b/components/dada-execute/src/heap_graph/graphviz.rs index 3ae853f8..2b187bd6 100644 --- a/components/dada-execute/src/heap_graph/graphviz.rs +++ b/components/dada-execute/src/heap_graph/graphviz.rs @@ -352,7 +352,7 @@ impl HeapGraph { if let Some(name) = name { w.permissions .entry(edge.permission) - .or_insert(vec![]) + .or_default() .push(GraphvizPlace { node: source.to_string(), port: index, @@ -400,7 +400,7 @@ impl HeapGraph { /// /// If there is no graph to diff against, return true, as everything /// is considered to have changed. - fn value_edge_did_change(&self, w: &mut GraphvizWriter<'_>, edge: ValueEdge) -> bool { + fn value_edge_did_change(&self, w: &GraphvizWriter<'_>, edge: ValueEdge) -> bool { let edge_data = edge.data(&self.tables); if self.permission_node_did_change(w, edge_data.permission) { @@ -414,11 +414,7 @@ impl HeapGraph { /// /// If there is no graph to diff against, return true, as everything /// is considered to have changed. - fn value_edge_target_did_change( - &self, - w: &mut GraphvizWriter<'_>, - edge: ValueEdgeTarget, - ) -> bool { + fn value_edge_target_did_change(&self, w: &GraphvizWriter<'_>, edge: ValueEdgeTarget) -> bool { let Some(diff_against) = w.diff_against else { return true; }; @@ -452,7 +448,7 @@ impl HeapGraph { /// is considered to have changed. fn permission_node_did_change( &self, - w: &mut GraphvizWriter<'_>, + w: &GraphvizWriter<'_>, permission: PermissionNode, ) -> bool { let Some(diff_against) = w.diff_against else { diff --git a/components/dada-execute/src/machine.rs b/components/dada-execute/src/machine.rs index 3b23bfcd..4975136f 100644 --- a/components/dada-execute/src/machine.rs +++ b/components/dada-execute/src/machine.rs @@ -469,10 +469,10 @@ impl ProgramCounter { /// True if this PC represents a `return` terminator. pub fn is_return(&self, db: &dyn crate::Db) -> bool { let bir_data = self.bir.data(db); - match &bir_data.tables[self.control_point] { - bir::ControlPointData::Terminator(TerminatorData::Return(_)) => true, - _ => false, - } + matches!( + &bir_data.tables[self.control_point], + bir::ControlPointData::Terminator(TerminatorData::Return(_)), + ) } pub fn span(&self, db: &dyn crate::Db) -> FileSpan {