async-std feature flag doesn't disable after removing the feature flag
Closed this issue · 1 comments
Redhawk18 commented
error[E0252]: the name `AsyncReadExt` is defined multiple times
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/desktop/secret.rs:28:13
|
26 | use futures_util::AsyncReadExt;
| -------------------------- previous import of the trait `AsyncReadExt` here
27 | #[cfg(feature = "tokio")]
28 | use tokio::{io::AsyncReadExt, io::AsyncWriteExt, net::UnixStream};
| ^^^^^^^^^^^^^^^^ `AsyncReadExt` reimported here
|
= note: `AsyncReadExt` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
28 | use tokio::{io::AsyncReadExt as OtherAsyncReadExt, io::AsyncWriteExt, net::UnixStream};
| ++++++++++++++++++++
error[E0252]: the name `UnixStream` is defined multiple times
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/desktop/secret.rs:28:50
|
24 | use async_net::{unix::UnixStream, Shutdown};
| ---------------- previous import of the type `UnixStream` here
...
28 | use tokio::{io::AsyncReadExt, io::AsyncWriteExt, net::UnixStream};
| ^^^^^^^^^^^^^^^ `UnixStream` reimported here
|
= note: `UnixStream` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
28 | use tokio::{io::AsyncReadExt, io::AsyncWriteExt, net::UnixStream as OtherUnixStream};
| ++++++++++++++++++
error[E0252]: the name `File` is defined multiple times
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/helpers.rs:6:13
|
2 | use async_fs::File;
| -------------- previous import of the type `File` here
...
6 | use tokio::{fs::File, io::AsyncReadExt};
| ^^^^^^^^ `File` reimported here
|
= note: `File` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
6 | use tokio::{fs::File as OtherFile, io::AsyncReadExt};
| ++++++++++++
error[E0252]: the name `AsyncReadExt` is defined multiple times
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/helpers.rs:6:23
|
4 | use futures_util::AsyncReadExt;
| -------------------------- previous import of the trait `AsyncReadExt` here
5 | #[cfg(feature = "tokio")]
6 | use tokio::{fs::File, io::AsyncReadExt};
| ^^^^^^^^^^^^^^^^ `AsyncReadExt` reimported here
|
= note: `AsyncReadExt` must be defined only once in the type namespace of this module
help: you can use `as` to change the binding name of the import
|
6 | use tokio::{fs::File, io::AsyncReadExt as OtherAsyncReadExt};
| ++++++++++++++++++++
error: You can't enable both async-std & tokio features at once
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/lib.rs:10:1
|
10 | compile_error!("You can't enable both async-std & tokio features at once");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compiling glyphon v0.5.0 (https://github.com/hecrj/glyphon.git?rev=09712a70df7431e9a3b1ac1bbd4fb634096cb3b4#09712a70)
Compiling async-lsp v0.2.1
error[E0061]: this method takes 1 argument but 0 arguments were supplied
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/desktop/secret.rs:102:12
|
102 | x2.shutdown().await?;
| ^^^^^^^^-- argument #1 of type `Shutdown` is missing
|
note: method defined here
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async-net-2.0.0/src/unix.rs:345:12
|
345 | pub fn shutdown(&self, how: Shutdown) -> io::Result<()> {
| ^^^^^^^^
help: provide the argument
|
102 | x2.shutdown(/* Shutdown */).await?;
| ~~~~~~~~~~~~~~~~
error[E0277]: `std::result::Result<(), std::io::Error>` is not a future
--> /home/redhawk/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/ashpd-0.10.2/src/desktop/secret.rs:102:23
|
102 | x2.shutdown().await?;
| -^^^^^
| ||
| |`std::result::Result<(), std::io::Error>` is not a future
| help: remove the `.await`
|
= help: the trait `futures_util::Future` is not implemented for `std::result::Result<(), std::io::Error>`
= note: std::result::Result<(), std::io::Error> must be a future or must implement `IntoFuture` to be awaited
= note: required for `std::result::Result<(), std::io::Error>` to implement `std::future::IntoFuture`rfd = { version = "0.15", default-features = false, features = [ "xdg-portal", "tokio"]}leo030303 commented
The build error should be fixed in 0.15.3, I had the same issue and it builds fine now