Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Windows 11 while installing via cargo #38

Open
IngoTB303 opened this issue Sep 29, 2024 · 3 comments
Open

Error on Windows 11 while installing via cargo #38

IngoTB303 opened this issue Sep 29, 2024 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@IngoTB303
Copy link

error[E0728]: await is only allowed inside async functions and blocks
--> C:\Users<user>.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-wifiscanner-0.2.1\src\sys\windows.rs:11:10
|
6 | pub fn scan() -> Result<Vec> {
| ---------------------------------- this is not async
...
11 | .await
| ^^^^^ only allowed inside async functions and blocks

error[E0277]: std::result::Result<Vec<Wifi>, Error> is not a future
--> C:\Users<user>.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-wifiscanner-0.2.1\src\lib.rs:110:24
|
110 | crate::sys::scan().await
| ------------------ ^^^^^ std::result::Result<Vec<Wifi>, Error> is not a future
| |
| this call returns std::result::Result<Vec<Wifi>, Error>
|
= help: the trait Future is not implemented for std::result::Result<Vec<Wifi>, Error>, which is required by std::result::Result<Vec<Wifi>, Error>: IntoFuture
= note: std::result::Result<Vec, Error> must be a future or must implement IntoFuture to be awaited
= note: required for std::result::Result<Vec<Wifi>, Error> to implement IntoFuture
help: remove the .await
|
110 - crate::sys::scan().await
110 + crate::sys::scan()
|
help: alternatively, consider making fn scan asynchronous
--> C:\Users<user>.cargo\registry\src\index.crates.io-6f17d22bba15001f\tokio-wifiscanner-0.2.1\src\sys\windows.rs:6:4
|
6 | pub async fn scan() -> Result<Vec> {
| +++++

Compiling clap v4.5.1
Some errors have detailed explanations: E0277, E0728.
For more information about an error, try rustc --explain E0277.
Compiling pest_derive v2.7.8
error: could not compile tokio-wifiscanner (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: failed to compile netscanner v0.5.3, intermediate artifacts can be found at C:\Users\<user>\AppData\Local\Temp\cargo-installiaOl9x.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

@Chleba Chleba added bug Something isn't working enhancement New feature or request labels Sep 29, 2024
@Chleba
Copy link
Owner

Chleba commented Sep 29, 2024

Hi @IngoTB303,
Yes I know about this. It is inside one of the crate that netscanner is using for scanning wifi networks and soon I will removed this crate and I will try to implement some better or at lease my own wifi scanning that will support win & mac (mac because airport is no longer supported in macOS).
So If I may ask to either wait after I finish one more feature and do a proper wifi scanning OR you may try install ubuntu or some other distro to install netscanner.

@Chleba
Copy link
Owner

Chleba commented Oct 3, 2024

Hi,
@EphemeralSapient create a PR to fix this issue. I will take a look at it ASAP and it should fix this issue for a Windows OS.

@Chleba
Copy link
Owner

Chleba commented Oct 5, 2024

PR with windows support is here: #39

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants