fix clippy warning

poc-serde-support
k-nasa 5 years ago
parent eeb44c86e9
commit caa23381f0

@ -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…
Cancel
Save