Skip to content

Commit a9580a9

Browse files
Merge pull request #872 from TaKO8Ki/fix-clippy-warnings
2 parents f731959 + 04bb83f commit a9580a9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/rt/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ pub static RUNTIME: Lazy<Runtime> = Lazy::new(|| {
2222
.unwrap_or_else(|_| num_cpus::get())
2323
.max(1);
2424

25-
let thread_name = env::var("ASYNC_STD_THREAD_NAME").unwrap_or("async-std/runtime".to_string());
25+
let thread_name =
26+
env::var("ASYNC_STD_THREAD_NAME").unwrap_or_else(|_| "async-std/runtime".to_string());
2627

2728
for _ in 0..thread_count {
2829
thread::Builder::new()

src/stream/stream/inspect.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ where
4141
let mut this = self.project();
4242
let next = futures_core::ready!(this.stream.as_mut().poll_next(cx));
4343

44-
Poll::Ready(next.and_then(|x| {
44+
Poll::Ready(next.map(|x| {
4545
(this.f)(&x);
46-
Some(x)
46+
x
4747
}))
4848
}
4949
}

src/task/builder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl Builder {
4141
#[cfg(not(target_os = "unknown"))]
4242
once_cell::sync::Lazy::force(&crate::rt::RUNTIME);
4343

44-
let tag = TaskLocalsWrapper::new(task.clone());
44+
let tag = TaskLocalsWrapper::new(task);
4545

4646
SupportTaskLocals { tag, future }
4747
}

0 commit comments

Comments
 (0)