Skip to content

Commit

Permalink
fix: eliminate warns
Browse files Browse the repository at this point in the history
  • Loading branch information
mtshiba committed Nov 18, 2023
1 parent 30a6f84 commit b838154
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/erg_common/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ impl Ord for Location {
}

impl PartialOrd for Location {
#[allow(clippy::incorrect_partial_ord_impl_on_ord_type)]
#[allow(clippy::non_canonical_partial_ord_impl)]
fn partial_cmp(&self, other: &Location) -> Option<Ordering> {
if self.is_unknown() || other.is_unknown() {
None
Expand Down
2 changes: 1 addition & 1 deletion crates/erg_common/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,7 @@ pub trait Runnable: Sized + Default + New {
let indent = vm.indent();
if vm.now_block.len() > 1 {
output.write_all(instance.ps2().as_bytes()).unwrap();
output.write_all(indent.as_str().as_bytes()).unwrap();
output.write_all(indent.as_bytes()).unwrap();
output.flush().unwrap();
} else {
output.write_all(instance.ps1().as_bytes()).unwrap();
Expand Down
2 changes: 1 addition & 1 deletion crates/erg_compiler/link_hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ impl<'a> HIRLinker<'a> {
if !mod_path
.canonicalize()
.unwrap()
.starts_with(&dir.canonicalize().unwrap())
.starts_with(dir.canonicalize().unwrap())
{
dir = PathBuf::new();
}
Expand Down

0 comments on commit b838154

Please sign in to comment.