When doing the tutorial for power-of, I copied the Rust code from the doc site and it embedded the code into a main fn:
#![allow(unused)]
fn main() {
wit_bindgen_rust::export!("power.wit");
struct Power;
impl power::Power for Power {
fn power_of(base: i32, exp: i32) -> i32 {
let mut res = 1;
for _i in 0..exp {
res *= base;
}
res
}
}
}
This caused an E0412 error when compiling. Checked with @pvetere and this is not intended. Not sure if this affects other tutorials/code examples or not (I'm guessing it probably does). Doesn't seem to happen when copying directly from the GitHub docs, just the doc site.
When doing the tutorial for
power-of
, I copied the Rust code from the doc site and it embedded the code into amain
fn:This caused an
E0412
error when compiling. Checked with @pvetere and this is not intended. Not sure if this affects other tutorials/code examples or not (I'm guessing it probably does). Doesn't seem to happen when copying directly from the GitHub docs, just the doc site.