chore: bow to the clippy
This commit is contained in:
parent
724f1ac4b6
commit
2a00ef281b
|
@ -718,18 +718,13 @@ impl Annotation {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
#[derive(Debug, Clone, PartialEq, Eq, Default)]
|
||||||
pub enum Layer {
|
pub enum Layer {
|
||||||
|
#[default]
|
||||||
Value,
|
Value,
|
||||||
Type,
|
Type,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Layer {
|
|
||||||
fn default() -> Self {
|
|
||||||
Layer::Value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Layer {
|
impl Layer {
|
||||||
/// Returns `true` if the layer is [`Value`].
|
/// Returns `true` if the layer is [`Value`].
|
||||||
pub fn is_value(&self) -> bool {
|
pub fn is_value(&self) -> bool {
|
||||||
|
|
|
@ -792,7 +792,7 @@ Perhaps, try the following:
|
||||||
suggest_neighbor(
|
suggest_neighbor(
|
||||||
name,
|
name,
|
||||||
variables.iter(),
|
variables.iter(),
|
||||||
&if name.chars().into_iter().next().unwrap().is_uppercase() {
|
&if name.chars().next().unwrap().is_uppercase() {
|
||||||
suggest_import_constructor()
|
suggest_import_constructor()
|
||||||
} else {
|
} else {
|
||||||
"Did you forget to import it?".to_string()
|
"Did you forget to import it?".to_string()
|
||||||
|
|
|
@ -4468,7 +4468,6 @@ impl<'a> CodeGenerator<'a> {
|
||||||
| DefaultFunction::Trace => unimplemented!("{func:#?}"),
|
| DefaultFunction::Trace => unimplemented!("{func:#?}"),
|
||||||
DefaultFunction::ChooseData => {
|
DefaultFunction::ChooseData => {
|
||||||
let temp_vars = (0..func.arity())
|
let temp_vars = (0..func.arity())
|
||||||
.into_iter()
|
|
||||||
.map(|_| format!("__item_{}", self.id_gen.next()))
|
.map(|_| format!("__item_{}", self.id_gen.next()))
|
||||||
.collect_vec();
|
.collect_vec();
|
||||||
|
|
||||||
|
|
|
@ -138,7 +138,6 @@ pub fn aiken_files_excluding_gitignore(dir: &Path) -> impl Iterator<Item = PathB
|
||||||
.follow_links(true)
|
.follow_links(true)
|
||||||
.require_git(false)
|
.require_git(false)
|
||||||
.build()
|
.build()
|
||||||
.into_iter()
|
|
||||||
.filter_map(Result::ok)
|
.filter_map(Result::ok)
|
||||||
.filter(|e| e.file_type().map(|t| t.is_file()).unwrap_or(false))
|
.filter(|e| e.file_type().map(|t| t.is_file()).unwrap_or(false))
|
||||||
.map(ignore::DirEntry::into_path)
|
.map(ignore::DirEntry::into_path)
|
||||||
|
|
Loading…
Reference in New Issue