fix(napi): return self in Property#with_property_attributes

This commit is contained in:
LongYinan 2020-10-31 22:22:23 +08:00
parent f1f9402a44
commit 8c9295f6f0
No known key found for this signature in database
GPG key ID: C3666B7FC82ADAD7

View file

@ -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 {