Skip to content

Commit

Permalink
Merge pull request rust-lang#194 from llogiq/clippy
Browse files Browse the repository at this point in the history
fixed another bunch of clippy warnings
  • Loading branch information
alexcrichton authored Oct 6, 2016
2 parents a7ed05b + b7b4e34 commit 79e2d9c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/fuse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl<A: Future> Future for Fuse<A> {
res @ Ok(Async::Ready(_)) |
res @ Err(_) => {
self.future = None;
return res
res
}
Ok(Async::NotReady) => Ok(Async::NotReady)
}
Expand Down
2 changes: 1 addition & 1 deletion src/lock.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! A "mutex" which only supports try_lock
//! A "mutex" which only supports `try_lock`
//!
//! As a futures library the eventual call to an event loop should be the only
//! thing that ever blocks, so this is assisted with a fast user-space
Expand Down
5 changes: 1 addition & 4 deletions src/stream/merge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,12 @@ impl<S1, S2> Stream for Merge<S1, S2>
self.queued_error = Some(e);
Ok(Async::Ready(Some(MergedItem::First(item1))))
}
Ok(Async::NotReady) => {
Ok(Async::NotReady) | Ok(Async::Ready(None)) => {
Ok(Async::Ready(Some(MergedItem::First(item1))))
}
Ok(Async::Ready(Some(item2))) => {
Ok(Async::Ready(Some(MergedItem::Both(item1, item2))))
}
Ok(Async::Ready(None)) => {
Ok(Async::Ready(Some(MergedItem::First(item1))))
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/task/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn fresh_task_id() -> usize {
let id = NEXT_ID.fetch_add(1, Ordering::Relaxed);
assert!(id < usize::max_value() / 2,
"too many previous tasks have been allocated");
return id
id
}

fn set<F, R>(task: &Task, data: &data::LocalMap, f: F) -> R
Expand Down
4 changes: 2 additions & 2 deletions tests/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fn list() -> Receiver<i32, u32> {
.and_then(|tx| tx.send(Ok(2)))
.and_then(|tx| tx.send(Ok(3)))
.forget();
return rx
rx
}

fn err_list() -> Receiver<i32, u32> {
Expand All @@ -23,7 +23,7 @@ fn err_list() -> Receiver<i32, u32> {
.and_then(|tx| tx.send(Ok(2)))
.and_then(|tx| tx.send(Err(3)))
.forget();
return rx
rx
}

#[test]
Expand Down

0 comments on commit 79e2d9c

Please sign in to comment.