Full qualify types
This commit is contained in:
parent
1013052de3
commit
a14cbbb836
8 changed files with 126 additions and 111 deletions
examples/napi/src
|
@ -1,5 +1,3 @@
|
|||
use napi::bindgen_prelude::*;
|
||||
|
||||
#[napi]
|
||||
fn get_words() -> Vec<&'static str> {
|
||||
vec!["foo", "bar"]
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
use napi::bindgen_prelude::*;
|
||||
use napi::Result;
|
||||
|
||||
use crate::r#enum::Kind;
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use napi::bindgen_prelude::*;
|
||||
|
||||
#[napi]
|
||||
pub struct ClassWithFactory {
|
||||
pub name: String,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use napi::bindgen_prelude::*;
|
||||
|
||||
#[napi]
|
||||
fn map_option(val: Option<u32>) -> Option<u32> {
|
||||
val.map(|v| v + 1)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
use napi::bindgen_prelude::*;
|
||||
|
||||
#[napi]
|
||||
fn add(a: u32, b: u32) -> u32 {
|
||||
a + b
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue