fix: eliminate warns

This commit is contained in:
Shunsuke Shibayama 2023-11-18 16:11:22 +09:00
parent 30a6f84e5f
commit b838154c8c
3 changed files with 3 additions and 3 deletions

View file

@ -373,7 +373,7 @@ impl Ord for Location {
} }
impl PartialOrd 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> { fn partial_cmp(&self, other: &Location) -> Option<Ordering> {
if self.is_unknown() || other.is_unknown() { if self.is_unknown() || other.is_unknown() {
None None

View file

@ -769,7 +769,7 @@ pub trait Runnable: Sized + Default + New {
let indent = vm.indent(); let indent = vm.indent();
if vm.now_block.len() > 1 { if vm.now_block.len() > 1 {
output.write_all(instance.ps2().as_bytes()).unwrap(); 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(); output.flush().unwrap();
} else { } else {
output.write_all(instance.ps1().as_bytes()).unwrap(); output.write_all(instance.ps1().as_bytes()).unwrap();

View file

@ -491,7 +491,7 @@ impl<'a> HIRLinker<'a> {
if !mod_path if !mod_path
.canonicalize() .canonicalize()
.unwrap() .unwrap()
.starts_with(&dir.canonicalize().unwrap()) .starts_with(dir.canonicalize().unwrap())
{ {
dir = PathBuf::new(); dir = PathBuf::new();
} }