Skip to content

Commit e413e42

Browse files
committed
Address clippy lints
Signed-off-by: Nick Spinale <nick@nickspinale.com>
1 parent 1b87718 commit e413e42

File tree

2 files changed

+4
-4
lines changed
  • crates

2 files changed

+4
-4
lines changed

crates/sel4-ctors-dtors/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ unsafe fn run_array(
5050
section_name: &'static str,
5151
) -> Result<(), Error> {
5252
if start_addr != end_addr {
53-
if start_addr % mem::size_of::<ArrayEntry>() != 0
54-
|| end_addr % mem::size_of::<ArrayEntry>() != 0
53+
if !start_addr.is_multiple_of(mem::size_of::<ArrayEntry>())
54+
|| !end_addr.is_multiple_of(mem::size_of::<ArrayEntry>())
5555
{
5656
return Err(Error::Misaligned { section_name });
5757
}

crates/sel4-generate-target-specs/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ fn all_target_specs() -> BTreeMap<String, Target> {
299299

300300
fn do_list() {
301301
for target_name in all_target_specs().keys() {
302-
println!("{}", target_name)
302+
println!("{target_name}")
303303
}
304304
}
305305

@@ -322,7 +322,7 @@ fn write_one(
322322
target_name: &str,
323323
target_spec: &Target,
324324
) -> std::io::Result<()> {
325-
let path = target_dir.as_ref().join(format!("{}.json", target_name));
325+
let path = target_dir.as_ref().join(format!("{target_name}.json"));
326326
let contents = format!("{:#}\n", target_spec.to_json());
327327
fs::write(path, contents)
328328
}

0 commit comments

Comments
 (0)