Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix the CI#1085

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Keruspe merged 2 commits intoasync-rs:mainfromKeruspe:release-prepare
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletionCargo.toml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -86,7 +86,7 @@ futures-lite = { version = "2.0.0", optional = true }
async-process = { version = "2.0.0", optional = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
gloo-timers = { version = "0.2.1", features = ["futures"], optional = true }
gloo-timers = { version = "0.3.0", features = ["futures"], optional = true }
wasm-bindgen-futures = { version = "0.4.10", optional = true }
futures-channel = { version = "0.3.4", optional = true }

Expand Down
1 change: 1 addition & 0 deletionsexamples/a-chat/server.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -96,6 +96,7 @@ async fn connection_writer_loop(
None =>break,
},
void = shutdown.next().fuse() =>match void{
#[allow(unreachable_patterns)]
Some(void) =>match void{},
None =>break,
}
Expand Down
2 changes: 2 additions & 0 deletionssrc/future/future/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -27,6 +27,7 @@ pub use core::future::Future as Future;
[`Future`]: ../future/trait.Future.html
"#]
#[cfg(any(feature ="std", feature ="docs"))]
pubtraitFutureExt:Future{
/// Returns a Future that delays execution for a specified time.
///
Expand DownExpand Up@@ -284,5 +285,6 @@ pub trait FutureExt: Future {
}
}

#[cfg(any(feature ="std", feature ="docs"))]
impl<T:Future + ?Sized>FutureExtforT{}

2 changes: 1 addition & 1 deletionsrc/io/buf_writer.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -114,7 +114,7 @@ pin_project! {
/// # Ok(()) }) }
///```
#[derive(Debug)]
pubstructIntoInnerError<W>(W,crate::io::Error);
pubstructIntoInnerError<W>(W,#[allow(dead_code)]crate::io::Error);

impl<W:Write>BufWriter<W>{
/// Creates a new `BufWriter` with a default buffer capacity. The default is currently 8 KB,
Expand Down
2 changes: 1 addition & 1 deletionsrc/io/read/bytes.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -32,7 +32,7 @@ impl<T: Read + Unpin> Stream for Bytes<T> {
}
}

#[cfg(all(test, default))]
#[cfg(all(test,feature = "default", not(target_arch = "wasm32")))]
mod tests {
use crate::io;
use crate::prelude::*;
Expand Down
2 changes: 1 addition & 1 deletionsrc/io/read/chain.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -165,7 +165,7 @@ impl<T: BufRead, U: BufRead> BufRead for Chain<T, U> {
}
}

#[cfg(all(test, default))]
#[cfg(all(test,feature = "default", not(target_arch = "wasm32")))]
mod tests {
use crate::io;
use crate::prelude::*;
Expand Down
6 changes: 4 additions & 2 deletionssrc/io/stderr.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -204,11 +204,13 @@ cfg_windows! {
}

cfg_io_safety! {
use crate::os::unix::io::{AsHandle, BorrowedHandle};
use crate::os::windows::io::{AsHandle, BorrowedHandle};

impl AsHandle for Stderr {
fn as_handle(&self) -> BorrowedHandle<'_> {
std::io::stderr().as_handle()
unsafe {
BorrowedHandle::borrow_raw(std::io::stderr().as_raw_handle())
}
}
}
}
Expand Down
10 changes: 6 additions & 4 deletionssrc/io/stdin.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -230,11 +230,13 @@ cfg_windows! {
}

cfg_io_safety! {
use crate::os::unix::io::{AsFd, BorrowedFd};
use crate::os::windows::io::{AsHandle, BorrowedHandle};

impl AsFd for Stdin {
fn as_fd(&self) -> BorrowedFd<'_> {
std::io::stdin().as_fd()
impl AsHandle for Stdin {
fn as_handle(&self) -> BorrowedHandle<'_> {
unsafe {
BorrowedHandle::borrow_raw(std::io::stdin().as_raw_handle())
}
}
}
}
Expand Down
6 changes: 4 additions & 2 deletionssrc/io/stdout.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -204,11 +204,13 @@ cfg_windows! {
}

cfg_io_safety! {
use crate::os::unix::io::{AsHandle, BorrowedHandle};
use crate::os::windows::io::{AsHandle, BorrowedHandle};

impl AsHandle for Stdout {
fn as_handle(&self) -> BorrowedHandle<'_> {
std::io::stdout().as_handle()
unsafe {
BorrowedHandle::borrow_raw(std::io::stdout().as_raw_handle())
}
}
}
}
Expand Down
2 changes: 0 additions & 2 deletionssrc/lib.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -284,8 +284,6 @@
#![doc(test(attr(allow(unused_extern_crates, unused_variables))))]
#![doc(html_logo_url ="https://async.rs/images/logo--hero.svg")]

externcrate alloc;

#[macro_use]
mod utils;

Expand Down
4 changes: 2 additions & 2 deletionssrc/net/tcp/stream.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -477,13 +477,13 @@ cfg_windows! {

impl From<OwnedSocket> for TcpStream {
fn from(fd: OwnedSocket) -> TcpStream {
std::net::TcpListener::from(fd).into()
std::net::TcpStream::from(fd).into()
}
}

impl From<TcpStream> for OwnedSocket {
fn from(stream: TcpStream) -> OwnedSocket {
stream.watcher.into_inner().unwrap().into()
stream.watcher.get_ref().try_clone().unwrap().into()
}
}
}
Expand Down
2 changes: 1 addition & 1 deletionsrc/net/udp/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -620,7 +620,7 @@ cfg_windows! {

impl From<OwnedSocket> for UdpSocket {
fn from(fd: OwnedSocket) -> UdpSocket {
std::net::TcpListener::from(fd).into()
std::net::UdpSocket::from(fd).into()
}
}

Expand Down
7 changes: 6 additions & 1 deletionsrc/stream/mod.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -34,12 +34,17 @@
//! [`Stream`] looks like this:
//!
//! ```
//! #![allow(dead_code)]
//! # use async_std::task::{Context, Poll};
//! # use std::pin::Pin;
//! trait Stream {
//!pubtrait Stream {
//! type Item;
//! fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>>;
//! }
//! # impl Stream for () {
//! # type Item = ();
//! # fn poll_next(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Option<Self::Item>> { Poll::Pending }
//! # }
//! ```
//!
//! A stream has a method, [`next`], which when called, returns an
Expand Down
7 changes: 2 additions & 5 deletionssrc/utils.rs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
use alloc::string::String;

/// Calls a function and aborts if it panics.
///
/// This is useful in unsafe code where we can't recover from panics.
Expand DownExpand Up@@ -55,6 +53,7 @@ pub fn random(n: u32) -> u32 {
}

/// Add additional context to errors
#[cfg(feature ="std")]
pub(crate)traitContext{
fncontext(self,message:implFn() ->String) ->Self;
}
Expand DownExpand Up@@ -148,7 +147,7 @@ macro_rules! cfg_unstable_default {
($($item:item)*) =>{
$(
#[cfg(all(feature ="default", feature ="unstable"))]
#[cfg_attr(feature ="docs", doc(unstable))]
#[cfg_attr(feature ="docs", doc(cfg(unstable)))]
$item
)*
}
Expand All@@ -161,7 +160,6 @@ macro_rules! cfg_unix {
($($item:item)*) =>{
$(
#[cfg(any(unix, feature ="docs"))]
#[cfg_attr(feature ="docs", doc(cfg(unix)))]
$item
)*
}
Expand All@@ -174,7 +172,6 @@ macro_rules! cfg_windows {
($($item:item)*) =>{
$(
#[cfg(any(windows, feature ="docs"))]
#[cfg_attr(feature ="docs", doc(cfg(windows)))]
$item
)*
}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp