mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-29 20:34:44 +00:00
fix: eliminate warns
This commit is contained in:
parent
30a6f84e5f
commit
b838154c8c
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue