new clippies (#571)

Signed-off-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
xermicus authored and GitHub committed 2026-07-10 10:43:36 +02:00
1 parent 32763fedf2
commit e7c761c068
3 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -17,7 +17,7 @@ pub enum ObjectFormat {
}
impl ObjectFormat {
pub const PVM_MAGIC: [u8; 4] = [b'P', b'V', b'M', b'\0'];
pub const PVM_MAGIC: [u8; 4] = *b"PVM\0";
pub const ELF_MAGIC: [u8; 4] = [0x7f, b'E', b'L', b'F'];
}
+2 -2
View File
@@ -60,7 +60,7 @@ fn main_inner() -> anyhow::Result<()> {
.map_err(|platform| anyhow::anyhow!("Unknown platform `{}`", platform))?;
targets.insert(revive_llvm_builder::Platform::PolkaVM);
log::info!("build targets: {:?}", &targets);
log::info!("build targets: {:?}", targets);
let extra_args_unescaped: Vec<String> = extra_args
.iter()
@@ -91,7 +91,7 @@ fn main_inner() -> anyhow::Result<()> {
.map_err(|project| anyhow::anyhow!("Unknown LLVM project `{}`", project))?;
projects.insert(revive_llvm_builder::llvm_project::LLVMProject::LLD);
log::info!("build projects: {:?}", &projects);
log::info!("build projects: {:?}", projects);
revive_llvm_builder::build(
build_type,
+2 -3
View File
@@ -970,10 +970,9 @@ impl Simplifier {
let (exponent, value) =
if let Some(exponent) = rhs_value.as_ref().and_then(log2_exact) {
(exponent, lhs)
} else if let Some(exponent) = lhs_value.as_ref().and_then(log2_exact) {
(exponent, rhs)
} else {
return None;
let exponent = lhs_value.as_ref().and_then(log2_exact)?;
(exponent, rhs)
};
in_range(exponent).then(|| {
self.emit_strength_reduce(