chettoy / apexsky

https://apex.chettoy.com
GNU General Public License v3.0
146 stars 81 forks source link

Building error, How to solve it? #96

Closed Alexxweiadyre closed 7 months ago

Alexxweiadyre commented 7 months ago

When I built the source code using the way tuition provided, It shown 3 errors as below. How to solve it? Thx a lot!

error[E0053]: method unlink has an incompatible type for trait --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmer-wasix-0.18.1/src/fs/inode_guard.rs:532:29 532 fn unlink(&mut self) -> BoxFuture<'static, Result<(), FsError>> { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
expected Result<(), FsError>, found Pin<Box<...>>
help: change the output type to match the trait: std::result::Result<(), FsError>
= note: expected signature `fn(&mut WasiStateFileGuard) -> std::result::Result<(), FsError>`
           found signature `fn(&mut WasiStateFileGuard) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), FsError>> + std::marker::Send + 'static)>>`
error[E0277]: std::result::Result<(), FsError> is not a future --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmer-wasix-0.18.1/src/fs/inode_guard.rs:541:32 541 Ok(fut) => fut.await, -^^^^^
std::result::Result<(), FsError> is not a future
help: remove the .await
= help: the trait `futures::Future` is not implemented for `std::result::Result<(), FsError>`, which is required by `std::result::Result<(), FsError>: std::future::IntoFuture`
= note: std::result::Result<(), FsError> must be a future or must implement `IntoFuture` to be awaited
= note: required for `std::result::Result<(), FsError>` to implement `std::future::IntoFuture`
error[E0277]: std::result::Result<(), FsError> is not a future --> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wasmer-wasix-0.18.1/src/syscalls/wasi/path_unlink_file.rs:104:33 104 ... fut.await.map_err(fs_error_into_wasi_err) -^^^^^
std::result::Result<(), FsError> is not a future
help: remove the .await
= help: the trait `futures::Future` is not implemented for `std::result::Result<(), FsError>`, which is required by `std::result::Result<(), FsError>: std::future::IntoFuture`
= note: std::result::Result<(), FsError> must be a future or must implement `IntoFuture` to be awaited
= note: required for `std::result::Result<(), FsError>` to implement `std::future::IntoFuture`

Some errors have detailed explanations: E0053, E0277. For more information about an error, try rustc --explain E0053. error: could not compile wasmer-wasix (lib) due to 3 previous errors

chettoy commented 7 months ago

Fixed.