From 8c9295f6f0b145df80925b4a9936ab400c25c249 Mon Sep 17 00:00:00 2001 From: LongYinan Date: Sat, 31 Oct 2020 22:22:23 +0800 Subject: [PATCH] fix(napi): return self in Property#with_property_attributes --- napi/src/js_values/object_property.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/napi/src/js_values/object_property.rs b/napi/src/js_values/object_property.rs index 43a64606..f0c45390 100644 --- a/napi/src/js_values/object_property.rs +++ b/napi/src/js_values/object_property.rs @@ -74,8 +74,9 @@ impl<'env> Property<'env> { self } - pub fn with_property_attributes(mut self, attributes: PropertyAttributes) { + pub fn with_property_attributes(mut self, attributes: PropertyAttributes) -> Self { self.raw_descriptor.attributes = attributes.into(); + self } pub(crate) fn raw(&self) -> sys::napi_property_descriptor {