mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-01 07:41:12 +00:00
clippy
This commit is contained in:
parent
e17d1a5517
commit
637360fad5
3 changed files with 3 additions and 2 deletions
|
@ -423,7 +423,7 @@ pub fn sort_can_defs(
|
||||||
let mut defined_symbols: Vec<Symbol> = Vec::new();
|
let mut defined_symbols: Vec<Symbol> = Vec::new();
|
||||||
let mut defined_symbols_set: ImSet<Symbol> = ImSet::default();
|
let mut defined_symbols_set: ImSet<Symbol> = ImSet::default();
|
||||||
|
|
||||||
for symbol in can_defs_by_symbol.keys().into_iter() {
|
for symbol in can_defs_by_symbol.keys() {
|
||||||
defined_symbols.push(*symbol);
|
defined_symbols.push(*symbol);
|
||||||
defined_symbols_set.insert(*symbol);
|
defined_symbols_set.insert(*symbol);
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ pub fn canonicalize_pattern<'a>(
|
||||||
}
|
}
|
||||||
Ok((int, bound)) => {
|
Ok((int, bound)) => {
|
||||||
let sign_str = if is_negative { "-" } else { "" };
|
let sign_str = if is_negative { "-" } else { "" };
|
||||||
let int_str = format!("{}{}", sign_str, int.to_string()).into_boxed_str();
|
let int_str = format!("{}{}", sign_str, int).into_boxed_str();
|
||||||
let i = match int {
|
let i = match int {
|
||||||
// Safety: this is fine because I128::MAX = |I128::MIN| - 1
|
// Safety: this is fine because I128::MAX = |I128::MIN| - 1
|
||||||
IntValue::I128(n) if is_negative => IntValue::I128(-n),
|
IntValue::I128(n) if is_negative => IntValue::I128(-n),
|
||||||
|
|
|
@ -3430,6 +3430,7 @@ pub fn with_hole<'a>(
|
||||||
let mut field_symbols = Vec::with_capacity_in(fields.len(), env.arena);
|
let mut field_symbols = Vec::with_capacity_in(fields.len(), env.arena);
|
||||||
let mut can_fields = Vec::with_capacity_in(fields.len(), env.arena);
|
let mut can_fields = Vec::with_capacity_in(fields.len(), env.arena);
|
||||||
|
|
||||||
|
#[allow(clippy::enum_variant_names)]
|
||||||
enum Field {
|
enum Field {
|
||||||
// TODO: rename this since it can handle unspecialized expressions now too
|
// TODO: rename this since it can handle unspecialized expressions now too
|
||||||
Function(Symbol, Variable),
|
Function(Symbol, Variable),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue