Skip to content

Commit

Permalink
Fix some clippy warnings from Rust 1.53
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissie-c committed Jun 21, 2021
1 parent 779385d commit 70714f4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libknet/bindings/rust/src/knet_bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl HostId {
{
HostId{host_id: id}
}
pub fn to_u16(self: &HostId) -> u16
pub fn to_u16(self: HostId) -> u16
{
self.host_id
}
Expand Down Expand Up @@ -426,7 +426,7 @@ pub fn handle_new(host_id: &HostId,
flags.bits)
};

if res == std::ptr::null_mut() {
if res.is_null() {
Err(Error::last_os_error())
} else {
let rhandle = PrivHandle{log_fd,
Expand Down Expand Up @@ -1337,7 +1337,7 @@ impl LinkPolicy{
_ => LinkPolicy::Passive,
}
}
pub fn to_u8(self: &LinkPolicy) -> u8
pub fn to_u8(self: LinkPolicy) -> u8
{
match self {
LinkPolicy::Passive => 0,
Expand Down

0 comments on commit 70714f4

Please sign in to comment.