Open 3nthusia5t opened 5 months ago
After a bit more digging I found this:
https://blog.rust-lang.org/2024/05/02/Rust-1.78.0.html#asserting-unsafe-preconditions
When run in release mode it works:
cargo run -r
I have tried few things to disable #[cfg(debug_assertions)] for this specific line of code, which triggers the error, but as far as I tried there is no way to disable that panic.
It is problematic as it doesn't allow me to interactively debug my code. The release version does not contain debug symbols and I am only able to debug using print statements.
https://github.com/pbatard/rufus/releases/download/v4.4/rufus-4.4.exe
I have tried to run the example code against the rufus-4.4.exe on Windows operating system. The code panicks on the line
let icon_file = dir.to_icon_buffer(&pe).unwrap();
The code which I run is available in repo: