async-rs / duplexify Goto Github PK
View Code? Open in Web Editor NEWCombine a reader + writer into a duplex of Read + Write
Home Page: https://docs.rs/duplexify
License: Apache License 2.0
Combine a reader + writer into a duplex of Read + Write
Home Page: https://docs.rs/duplexify
License: Apache License 2.0
The crate fails to build with pin-project-lite
at v0.1.9
printing the following
error[E0453]: allow(explicit_outlives_requirements) overruled by outer forbid(rust_2018_idioms)
--> /home/.cargo/registry/src/github.com-1ecc6299db9ec823/duplexify-1.2.1/src/lib.rs:42:1
|
34 | #![forbid(unsafe_code, rust_2018_idioms)]
| ---------------- `forbid` level set here
...
42 | / pin_project_lite::pin_project! {
43 | | /// Combine a reader + writer into a duplex of `Read` + `Write`.
44 | | #[derive(Debug)]
45 | | pub struct Duplex<R, W> {
... |
50 | | }
51 | | }
| |_^ overruled by previous forbid
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0453`.
error: could not compile `duplexify`.
I think it would be a great addition to also provide Sink
and Stream
implementations for Duplex
.
impl<T, R: Stream<T>, W> Stream<T> for Duplex<R, W> {}
impl<T, R, W: Sink<T>> Sink<T> for Duplex<R, W> {}
Iโd be happy to provide a PR.
Hello!
I've been starting to use duplexify for tests quite a lot. It works really well :)
This being said, I've noticed that the whole async-std appears to get pulled in when simply grabbing duplexify.
Do you think it'd be possible to make the dependency on async_std optional, or maybe to remove it altogether to simply depend on futures? I can try to have a look at contributing such a change if you'd be interested in it and don't have the time to look into it, though I can't promise anything about timeliness myself :)
Thank you anyway for duplexify!
Leo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.