forked from mirror/async-std
fix clippy warning
This commit is contained in:
parent
eeb44c86e9
commit
caa23381f0
3 changed files with 3 additions and 3 deletions
|
@ -120,7 +120,7 @@ impl Stderr {
|
|||
/// # Ok(()) }) }
|
||||
/// ```
|
||||
pub async fn lock(&self) -> StderrLock<'static> {
|
||||
static STDERR: Lazy<std::io::Stderr> = Lazy::new(|| std::io::stderr());
|
||||
static STDERR: Lazy<std::io::Stderr> = Lazy::new(std::io::stderr);
|
||||
|
||||
blocking::spawn(move || StderrLock(STDERR.lock())).await
|
||||
}
|
||||
|
|
|
@ -176,7 +176,7 @@ impl Stdin {
|
|||
/// # Ok(()) }) }
|
||||
/// ```
|
||||
pub async fn lock(&self) -> StdinLock<'static> {
|
||||
static STDIN: Lazy<std::io::Stdin> = Lazy::new(|| std::io::stdin());
|
||||
static STDIN: Lazy<std::io::Stdin> = Lazy::new(std::io::stdin);
|
||||
|
||||
blocking::spawn(move || StdinLock(STDIN.lock())).await
|
||||
}
|
||||
|
|
|
@ -120,7 +120,7 @@ impl Stdout {
|
|||
/// # Ok(()) }) }
|
||||
/// ```
|
||||
pub async fn lock(&self) -> StdoutLock<'static> {
|
||||
static STDOUT: Lazy<std::io::Stdout> = Lazy::new(|| std::io::stdout());
|
||||
static STDOUT: Lazy<std::io::Stdout> = Lazy::new(std::io::stdout);
|
||||
|
||||
blocking::spawn(move || StdoutLock(STDOUT.lock())).await
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue