forked from mirror/async-std
Merge pull request #297 from stjepang/stabilize-cursor
Stabilize io::Cursor
This commit is contained in:
commit
41bf106e21
3 changed files with 2 additions and 3 deletions
|
@ -21,7 +21,6 @@ use crate::task::{Context, Poll};
|
||||||
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
|
/// [`Vec`]: https://doc.rust-lang.org/std/vec/struct.Vec.html
|
||||||
/// [bytes]: https://doc.rust-lang.org/std/primitive.slice.html
|
/// [bytes]: https://doc.rust-lang.org/std/primitive.slice.html
|
||||||
/// [`File`]: struct.File.html
|
/// [`File`]: struct.File.html
|
||||||
#[cfg_attr(feature = "docs", doc(cfg(unstable)))]
|
|
||||||
#[derive(Clone, Debug, Default)]
|
#[derive(Clone, Debug, Default)]
|
||||||
pub struct Cursor<T> {
|
pub struct Cursor<T> {
|
||||||
inner: std::io::Cursor<T>,
|
inner: std::io::Cursor<T>,
|
||||||
|
|
|
@ -21,7 +21,7 @@ pub use crate::io::Read as _;
|
||||||
pub use crate::io::Seek as _;
|
pub use crate::io::Seek as _;
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::io::Write as _;
|
pub use crate::io::Write as _;
|
||||||
#[doc(hidden)]
|
#[doc(no_inline)]
|
||||||
pub use crate::stream::Stream;
|
pub use crate::stream::Stream;
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
pub use crate::task_local;
|
pub use crate::task_local;
|
||||||
|
|
|
@ -157,7 +157,7 @@ impl Barrier {
|
||||||
drop(lock);
|
drop(lock);
|
||||||
|
|
||||||
while local_gen == generation_id && count < self.n {
|
while local_gen == generation_id && count < self.n {
|
||||||
let (g, c) = wait.recv().await.expect("sender hasn not been closed");
|
let (g, c) = wait.recv().await.expect("sender has not been closed");
|
||||||
generation_id = g;
|
generation_id = g;
|
||||||
count = c;
|
count = c;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue