mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-02 08:11:12 +00:00
clippy
This commit is contained in:
parent
204aa6f88a
commit
079c95b993
1 changed files with 7 additions and 15 deletions
|
@ -352,12 +352,10 @@ impl<'a> BorrowInfState<'a> {
|
||||||
self.current_proc
|
self.current_proc
|
||||||
),
|
),
|
||||||
Some(set) => {
|
Some(set) => {
|
||||||
if set.contains(&extracted) {
|
if set.contains(&extracted) && set.insert(structure) {
|
||||||
if set.insert(structure) {
|
// entered if key was not yet present. If so, the set is modified,
|
||||||
// entered if key was not yet present. If so, the set is modified,
|
// hence we set this flag
|
||||||
// hence we set this flag
|
self.modified = true;
|
||||||
self.modified = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -380,7 +378,7 @@ impl<'a> BorrowInfState<'a> {
|
||||||
*p
|
*p
|
||||||
} else if self.is_owned(p.symbol) {
|
} else if self.is_owned(p.symbol) {
|
||||||
self.modified = true;
|
self.modified = true;
|
||||||
let mut p = p.clone();
|
let mut p = *p;
|
||||||
p.borrow = false;
|
p.borrow = false;
|
||||||
|
|
||||||
p
|
p
|
||||||
|
@ -395,7 +393,6 @@ impl<'a> BorrowInfState<'a> {
|
||||||
fn update_param_map_declaration(
|
fn update_param_map_declaration(
|
||||||
&mut self,
|
&mut self,
|
||||||
param_map: &mut ParamMap<'a>,
|
param_map: &mut ParamMap<'a>,
|
||||||
symbol: Symbol,
|
|
||||||
start: ParamOffset,
|
start: ParamOffset,
|
||||||
length: usize,
|
length: usize,
|
||||||
) {
|
) {
|
||||||
|
@ -883,7 +880,7 @@ impl<'a> BorrowInfState<'a> {
|
||||||
self.owned.entry(proc.name).or_default();
|
self.owned.entry(proc.name).or_default();
|
||||||
|
|
||||||
self.collect_stmt(param_map, &proc.body);
|
self.collect_stmt(param_map, &proc.body);
|
||||||
self.update_param_map_declaration(param_map, proc.name, param_offset, proc.args.len());
|
self.update_param_map_declaration(param_map, param_offset, proc.args.len());
|
||||||
|
|
||||||
self.param_set = old;
|
self.param_set = old;
|
||||||
}
|
}
|
||||||
|
@ -1008,12 +1005,7 @@ fn call_info_call<'a>(call: &crate::ir::Call<'a>, info: &mut CallInfo<'a>) {
|
||||||
use crate::ir::CallType::*;
|
use crate::ir::CallType::*;
|
||||||
|
|
||||||
match call.call_type {
|
match call.call_type {
|
||||||
ByName {
|
ByName { name, .. } => {
|
||||||
name,
|
|
||||||
ret_layout,
|
|
||||||
arg_layouts,
|
|
||||||
..
|
|
||||||
} => {
|
|
||||||
info.keys.push(name);
|
info.keys.push(name);
|
||||||
}
|
}
|
||||||
Foreign { .. } => {}
|
Foreign { .. } => {}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue