Skip to content

Commit

Permalink
guest: remove exposure
Browse files Browse the repository at this point in the history
i hoped this kind of wit changes didn't affect the API.
however, wit-bindgen rust has a bit complex rules (too complex in my taste)
to decide types, which alters the API like this.

cf. bytecodealliance/wit-bindgen#676
  • Loading branch information
yamt committed Nov 30, 2023
1 parent 4284fb4 commit 258d8b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guest/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ fn main2() -> Result<()> {
denominator: *ratio.denom() as u32,
});
println!("setting sampling rate to {:?}", value);
sensor.set_property(wasi::sensor::property::PropertyKey::SamplingRate, &value)?;
sensor.set_property(wasi::sensor::property::PropertyKey::SamplingRate, value)?;
// confirm the result
let value = sensor.get_property(wasi::sensor::property::PropertyKey::SamplingRate)?;
println!("sensor sampling rate {:?}", value);
Expand Down

0 comments on commit 258d8b2

Please sign in to comment.