Skip to content

Commit

Permalink
Some clippy changes
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed Mar 21, 2019
1 parent 64741da commit 363faf0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ impl Client {
e.security_mode == security_mode &&
e.security_policy_uri.as_ref() == security_policy_uri &&
url_matches(e.endpoint_url.as_ref(), &endpoint_url)
}).map(|e| e.clone());
}).cloned();

// If something was found, return it, otherwise try a fuzzier match that ignores the hostname.
if result.is_some() {
Expand All @@ -500,7 +500,7 @@ impl Client {
e.security_mode == security_mode &&
e.security_policy_uri.as_ref() == security_policy_uri &&
url_matches_except_host(e.endpoint_url.as_ref(), &endpoint_url)
}).map(|e| e.clone())
}).cloned()
}
}

Expand Down Expand Up @@ -543,7 +543,7 @@ impl Client {
security_mode == e.security_mode &&
security_policy == SecurityPolicy::from_uri(e.security_policy_uri.as_ref()) &&
url_matches_except_host(endpoint_url, e.endpoint_url.as_ref())
}).map(|e| e.clone());
}).cloned();

// Issue #16, #17 - the server may advertise an endpoint whose hostname is inaccessible
// to the client so substitute the advertised hostname with the one the client supplied.
Expand Down
2 changes: 1 addition & 1 deletion client/src/comms/tcp_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl WriteState {
fn send_request(&mut self, request: SupportedMessage) -> Result<u32, StatusCode> {
match connection_state!(self.state) {
ConnectionState::Processing => {
let mut secure_channel = trace_write_lock_unwrap!(self.secure_channel);
let secure_channel = trace_read_lock_unwrap!(self.secure_channel);
let request_id = self.send_buffer.next_request_id();
self.send_buffer.write(request_id, request, &secure_channel)
}
Expand Down
2 changes: 1 addition & 1 deletion client/src/subscription_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl SubscriptionState {
if self.subscriptions.is_empty() {
None
} else {
Some(self.subscriptions.keys().map(|k| *k).collect())
Some(self.subscriptions.keys().cloned().collect())
}
}

Expand Down

0 comments on commit 363faf0

Please sign in to comment.