Skip to content

Commit

Permalink
make clippy happy
Browse files Browse the repository at this point in the history
Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo committed Mar 6, 2023
1 parent 3ed5230 commit d370c66
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bindings/nodejs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ pub struct ObjectLister(opendal::Lister);

#[napi]
impl ObjectLister {
/// # Safety
///
/// > &mut self in async napi methods should be marked as unsafe
///
/// napi will make sure the function is safe, and we didn't do unsafe
/// thing internally.
#[napi]
pub async unsafe fn next(&mut self) -> Result<Option<DataObject>> {
Ok(self
Expand All @@ -188,7 +194,7 @@ impl ObjectLister {
.await
.map_err(format_napi_error)
.unwrap()
.map(|o| DataObject(o)))
.map(DataObject))
}
}

Expand Down

0 comments on commit d370c66

Please sign in to comment.