Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Sep 5, 2023
1 parent f5f5a83 commit 745351c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 13 deletions.
11 changes: 4 additions & 7 deletions lib/app/src/common/file_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,12 @@ impl FilePath {
format!(".{}", extension)
};

Self::new(
self.components().take(self.components.len() - 1).chain(
vec![regex::Regex::new(r"(\..*)?$")
Self::new(self.components().take(self.components.len() - 1).chain(
vec![regex::Regex::new(r"(\..*)?$")
.unwrap()
.replace(self.components.iter().last().unwrap(), replacement.as_str())
.deref()]
.into_iter(),
),
)
.deref()],
))
}

pub fn join(&self, file_path: &Self) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions lib/ffi/src/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ impl<T> Arc<T> {

Self {
block,
phantom: PhantomData::default(),
phantom: PhantomData,
}
}
}
Expand All @@ -45,7 +45,7 @@ impl<T> Clone for Arc<T> {
fn clone(&self) -> Self {
Self {
block: self.block.clone(),
phantom: PhantomData::default(),
phantom: PhantomData,
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions lib/lang/src/compile/transform/let_error_transformer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ impl LetErrorTransformer {
let_.source_information().clone(),
);

let_.definitions().iter().rev().fold(
Ok(let_.expression().clone()),
let_.definitions().iter().rev().try_fold(
let_.expression().clone(),
|expression, variable_definition| {
let ok_type = variable_definition.type_().clone();

Expand All @@ -55,7 +55,7 @@ impl LetErrorTransformer {
variable_definition.name(),
variable_definition.body().clone(),
vec![
Alternative::new(ok_type, expression?),
Alternative::new(ok_type, expression),
Alternative::new(
error_type.clone(),
self.coerce_type(
Expand Down
2 changes: 1 addition & 1 deletion lib/lang/src/path/module_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl ModulePath {
.into_iter()
.chain(self.components.iter())
.map(|component| component.as_str())
.chain(vec![name].into_iter())
.chain(vec![name])
.collect::<Vec<_>>()
.join(".")
}
Expand Down

0 comments on commit 745351c

Please sign in to comment.