Use cfg_if expression syntax to fix let-and-return

This commit is contained in:
Johannes Altmanninger
2025-12-19 18:52:28 +01:00
parent 17c35217b9
commit 26873d4ad2

View File

@@ -314,15 +314,14 @@ fn get(_file_path: &str) -> Option<rust_embed::EmbeddedFile> {
}
fn iter() -> rust_embed::Filenames {
use rust_embed::Filenames::*;
cfg_if!(
cfg_if! {
// TODO This is a clone of rebuild_if_embedded_path_changed.
if #[cfg(any(not(debug_assertions), windows))] {
let nothing = Embedded([].iter());
Embedded([].iter())
} else {
let nothing = Dynamic(Box::new(None.into_iter()));
Dynamic(Box::new(None.into_iter()))
}
);
nothing
}
}
}