Add clippy lints, action some clippy items
This commit is contained in:
@@ -31,7 +31,7 @@ impl WaitCondition {
|
||||
let context_lock = {
|
||||
let contexts = context::contexts();
|
||||
let context_lock = contexts.current().expect("WaitCondition::wait: no context");
|
||||
context_lock.clone()
|
||||
Arc::clone(&context_lock)
|
||||
};
|
||||
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ impl<K, V> WaitMap<K, V> where K: Clone + Ord {
|
||||
|
||||
pub fn receive_any_nonblock(&self) -> Option<(K, V)> {
|
||||
let mut inner = self.inner.lock();
|
||||
if let Some(key) = inner.keys().next().map(|key| key.clone()) {
|
||||
if let Some(key) = inner.keys().next().cloned() {
|
||||
inner.remove(&key).map(|value| (key, value))
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user