doc: typo
This commit is contained in:
parent
efb590447e
commit
5bd720a0cb
1 changed files with 1 additions and 1 deletions
|
@ -28,7 +28,7 @@ One nice feature is that this crate allows you to build add-ons purely with the
|
||||||
|
|
||||||
## Taste
|
## Taste
|
||||||
```rust
|
```rust
|
||||||
#[js_function(1)] // ------> argument length, omit for zero
|
#[js_function(1)] // ------> arguments length, omit for zero
|
||||||
fn fibonacci<'env>(ctx: CallContext<'env>) -> Result<Value<'env, Number>> {
|
fn fibonacci<'env>(ctx: CallContext<'env>) -> Result<Value<'env, Number>> {
|
||||||
let n = ctx.get::<Number>(0)?.try_into()?;
|
let n = ctx.get::<Number>(0)?.try_into()?;
|
||||||
ctx.env.create_int64(fibonacci_native(n))
|
ctx.env.create_int64(fibonacci_native(n))
|
||||||
|
|
Loading…
Reference in a new issue