docs: broken example in README.md

Fix https://github.com/napi-rs/napi-rs/issues/1158
This commit is contained in:
LongYinan 2022-05-06 17:42:03 +08:00
parent 4b06121c5e
commit b074608582
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -86,11 +86,9 @@ One nice feature is that this crate allows you to build add-ons purely with the
### Define JavaScript functions
```rust
#[macro_use]
extern crate napi;
/// import the preludes
use napi::bindgen_prelude::*;
use napi_derive::napi;
/// module registration is done by the runtime, no need to explicitly do it now.
#[napi]