Skip to content

Commit

Permalink
Fix clippy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
jcjones committed Jul 15, 2019
1 parent 0d89862 commit 987f3c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/u2fprotocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ where

let vendor = dev
.get_property("Manufacturer")
.unwrap_or(String::from("Unknown Vendor"));
.unwrap_or_else(|_| String::from("Unknown Vendor"));
let product = dev
.get_property("Product")
.unwrap_or(String::from("Unknown Device"));
.unwrap_or_else(|_| String::from("Unknown Device"));

dev.set_device_info(U2FDeviceInfo {
vendor_name: vendor.as_bytes().to_vec(),
Expand Down Expand Up @@ -322,7 +322,7 @@ mod tests {
}

fn get_property(&self, prop_name: &str) -> io::Result<String> {
Ok(String::from(format!("{} not implemented", prop_name)))
Ok(format!("{} not implemented", prop_name))
}
fn get_device_info(&self) -> U2FDeviceInfo {
self.dev_info.clone().unwrap()
Expand Down
2 changes: 1 addition & 1 deletion src/u2ftypes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ impl U2FHIDInitResp {

let rsp = U2FHIDInitResp {
cid: [
data[INIT_NONCE_SIZE + 0],
data[INIT_NONCE_SIZE],
data[INIT_NONCE_SIZE + 1],
data[INIT_NONCE_SIZE + 2],
data[INIT_NONCE_SIZE + 3],
Expand Down

0 comments on commit 987f3c4

Please sign in to comment.