From 61e084cf7ecf5c365c9ef147afed24903f25d5a4 Mon Sep 17 00:00:00 2001 From: Mees Delzenne Date: Mon, 18 Sep 2023 15:00:57 +0200 Subject: [PATCH] More doc fixes --- macro/src/lib.rs | 11 +++-------- macro/src/methods.rs | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/macro/src/lib.rs b/macro/src/lib.rs index dd3a7bec4..34eb6a72f 100644 --- a/macro/src/lib.rs +++ b/macro/src/lib.rs @@ -51,9 +51,6 @@ mod trace; /// /// Make a field enumerable. /// #[qjs(get, set, enumerable)] /// another_value: u32, -/// /// Make a field configurable. -/// #[qjs(get, set, configurable)] -/// another_configurable_field: u32, /// } /// /// pub fn main() { @@ -68,7 +65,6 @@ mod trace; /// inner_object: Object::new(ctx.clone()).unwrap(), /// some_value: 1, /// another_value: 2, -/// another_configurable_field: 3, /// }, /// ) /// .unwrap(); @@ -80,7 +76,7 @@ mod trace; /// if(t.someValue !== 1){ /// throw new Error(1) /// }"# -/// ) +/// ).unwrap(); /// }) /// } /// ``` @@ -208,10 +204,9 @@ pub fn function(attr: TokenStream1, item: TokenStream1) -> TokenStream1 { /// if(nv.value !== 5){ /// throw new Error('invalid value') /// } -/// " /// "#, -/// ) -/// }) +/// ).catch(&ctx).unwrap(); +/// }); /// } /// ``` #[proc_macro_attribute] diff --git a/macro/src/methods.rs b/macro/src/methods.rs index d0265b8be..1f7264adb 100644 --- a/macro/src/methods.rs +++ b/macro/src/methods.rs @@ -136,7 +136,7 @@ pub(crate) fn expand(options: OptionList, item: ItemImpl) -> TokenSt //let mut consts = Vec::new(); for item in items { - match dbg!(item) { + match item { syn::ImplItem::Const(_item) => {} syn::ImplItem::Fn(item) => { let function = Method::parse_impl_fn(item, &self_ty);