Closed kennykerr closed 4 weeks ago
You can for example use IReference
as follows (from another crate):
use windows::{core::*, Foundation::*};
fn main() -> Result<()> {
let r: IReference<i32> = PropertyValue::CreateInt32(123)?.cast()?;
assert_eq!(r.Value()?, 123);
Ok(())
}
I may just allow dead_code
to unblock other work until this is resolved in the Rust compiler.
This seems to be similar to https://github.com/rust-lang/rust/issues/126169
The latest Rust nightly compiler raises a new warning about dead code.
This seems like a Rust nightly bug. I don't see what's wrong with this code.
Originally noticed here: https://github.com/microsoft/windows-rs/actions/runs/9501067497/job/26185702630