Skip to content

Commit

Permalink
[CI] fix wasmedge-sys clippy
Browse files Browse the repository at this point in the history
Signed-off-by: csh <[email protected]>
  • Loading branch information
L-jasmine committed Dec 2, 2024
1 parent 2dcce56 commit d265266
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions crates/wasmedge-sys/src/ast_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ pub struct ImportType<'module> {
pub(crate) inner: InnerImportType,
pub(crate) module: &'module Module,
}
impl<'module> Drop for ImportType<'module> {
impl Drop for ImportType<'_> {
fn drop(&mut self) {
if !self.inner.0.is_null() {
self.inner.0 = std::ptr::null();
}
}
}
impl<'module> ImportType<'module> {
impl ImportType<'_> {
/// Returns the type of this import.
pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType> {
let ty = unsafe { ffi::WasmEdge_ImportTypeGetExternalType(self.inner.0) };
Expand Down Expand Up @@ -257,7 +257,7 @@ pub struct ExportType<'module> {
pub(crate) module: &'module Module,
}

impl<'module> ExportType<'module> {
impl ExportType<'_> {
/// Returns the type of this export.
pub fn ty(&self) -> WasmEdgeResult<ExternalInstanceType> {
let ty = unsafe { ffi::WasmEdge_ExportTypeGetExternalType(self.inner.0) };
Expand Down
4 changes: 2 additions & 2 deletions crates/wasmedge-sys/src/async/fiber.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ impl<'a> FiberFuture<'a> {
ASYNC_CX.set(&async_cx, || self.fiber.resume(val))
}
}
impl<'a> Future for FiberFuture<'a> {
impl Future for FiberFuture<'_> {
type Output = Result<(), ()>;
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
unsafe {
Expand Down Expand Up @@ -164,7 +164,7 @@ impl<'a> TimeoutFiberFuture<'a> {
}
}

impl<'a> Future for TimeoutFiberFuture<'a> {
impl Future for TimeoutFiberFuture<'_> {
type Output = Result<(), ()>;
fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
unsafe {
Expand Down

0 comments on commit d265266

Please sign in to comment.