This repository was archived by the owner on May 23, 2024. It is now read-only.
This repository was archived by the owner on May 23, 2024. It is now read-only.
backtrace printings #52
Closed
Description
May be I'm wrong but I cannot really understand the next code fragment in lib.rs:98
#[cfg(all(feature = "colors", feature = "println"))]
println!("{}0x{:x}", RED, addr - crate::arch::RA_OFFSET);
!!!!! #[cfg(not(any(feature = "colors", feature = "println")))]
println!("0x{:x}", addr - crate::arch::RA_OFFSET);
If it wants to differentiate between the "colors" and not "colors" scenario, I think it's wrong. The second #[cfg... gives false in case of no"colors", printing nothing in that case.
I think the proper #[cfg... would be:
#[cfg(all(not(feature = "colors"), feature = "println"))]
println!("0x{:x}", addr - crate::arch::RA_OFFSET);
But I'm quite a newbie, so may be I'm wrong and misunderstood something.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done