From caa23381f0e8471e2d5251bd2b71ae073f5076ba Mon Sep 17 00:00:00 2001 From: k-nasa Date: Fri, 1 Nov 2019 10:41:21 +0900 Subject: [PATCH] fix clippy warning --- src/io/stderr.rs | 2 +- src/io/stdin.rs | 2 +- src/io/stdout.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/stderr.rs b/src/io/stderr.rs index 7584dc1..334e50a 100644 --- a/src/io/stderr.rs +++ b/src/io/stderr.rs @@ -120,7 +120,7 @@ impl Stderr { /// # Ok(()) }) } /// ``` pub async fn lock(&self) -> StderrLock<'static> { - static STDERR: Lazy = Lazy::new(|| std::io::stderr()); + static STDERR: Lazy = Lazy::new(std::io::stderr); blocking::spawn(move || StderrLock(STDERR.lock())).await } diff --git a/src/io/stdin.rs b/src/io/stdin.rs index 359f2a3..8480c69 100644 --- a/src/io/stdin.rs +++ b/src/io/stdin.rs @@ -176,7 +176,7 @@ impl Stdin { /// # Ok(()) }) } /// ``` pub async fn lock(&self) -> StdinLock<'static> { - static STDIN: Lazy = Lazy::new(|| std::io::stdin()); + static STDIN: Lazy = Lazy::new(std::io::stdin); blocking::spawn(move || StdinLock(STDIN.lock())).await } diff --git a/src/io/stdout.rs b/src/io/stdout.rs index ccfd85b..aaa99ce 100644 --- a/src/io/stdout.rs +++ b/src/io/stdout.rs @@ -120,7 +120,7 @@ impl Stdout { /// # Ok(()) }) } /// ``` pub async fn lock(&self) -> StdoutLock<'static> { - static STDOUT: Lazy = Lazy::new(|| std::io::stdout()); + static STDOUT: Lazy = Lazy::new(std::io::stdout); blocking::spawn(move || StdoutLock(STDOUT.lock())).await }