Skip to content
Snippets Groups Projects
Commit 6d245b26 authored by Kivimango's avatar Kivimango
Browse files

clippy: Fix nested if statements

parent 62f438cb
No related branches found
No related tags found
1 merge request!297Silence compiler warnings and clippy fixes
......@@ -381,11 +381,9 @@ fn build(recipe_dir: &Path, source_dir: &Path, target_dir: &Path, build: &BuildR
let sysroot_dir = target_dir.join("sysroot");
// Rebuild sysroot if source is newer
//TODO: rebuild on recipe changes
if sysroot_dir.is_dir() {
if modified_dir(&sysroot_dir)? < source_modified {
eprintln!("DEBUG: '{}' newer than '{}'", source_dir.display(), sysroot_dir.display());
remove_all(&sysroot_dir)?;
}
if sysroot_dir.is_dir() && modified_dir(&sysroot_dir)? < source_modified {
eprintln!("DEBUG: '{}' newer than '{}'", source_dir.display(), sysroot_dir.display());
remove_all(&sysroot_dir)?;
}
if ! sysroot_dir.is_dir() {
// Create sysroot.tmp
......@@ -427,12 +425,11 @@ fn build(recipe_dir: &Path, source_dir: &Path, target_dir: &Path, build: &BuildR
let stage_dir = target_dir.join("stage");
// Rebuild stage if source is newer
//TODO: rebuild on recipe changes
if stage_dir.is_dir() {
if modified_dir(&stage_dir)? < source_modified {
eprintln!("DEBUG: '{}' newer than '{}'", source_dir.display(), stage_dir.display());
remove_all(&stage_dir)?;
}
if stage_dir.is_dir() && modified_dir(&stage_dir)? < source_modified {
eprintln!("DEBUG: '{}' newer than '{}'", source_dir.display(), stage_dir.display());
remove_all(&stage_dir)?;
}
if ! stage_dir.is_dir() {
// Create stage.tmp
let stage_dir_tmp = target_dir.join("stage.tmp");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment