Skip to content

Commit

Permalink
services/oilmarket minor codestyle fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
falamous committed Dec 4, 2023
1 parent cd9fd5f commit 3a12c04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions services/oilmarket/oilmarket/src/crypto/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl Hash {
0x8f2ce0f5,
0xb451eaa5
],
buffer: [].to_vec(),
buffer: Vec::new(),
}
}

Expand Down Expand Up @@ -60,7 +60,7 @@ impl Hash {

}
pub fn digest(self) -> Vec<u8> {
self.digest_values().iter().fold(vec![], |mut res, value| {
self.digest_values().iter().fold(Vec::new(), |mut res, value| {
res.extend_from_slice(&value.to_le_bytes());
res
})
Expand Down
2 changes: 1 addition & 1 deletion services/oilmarket/oilmarket/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl grpc::oilmarket_server::Oilmarket for Oilmarket {

let mut attesters = Vec::new();

if request_body.attesters.len() == 0 {
if request_body.attesters.is_empty() {
return Err(Status::invalid_argument("at least one attester must be present"))
}

Expand Down

0 comments on commit 3a12c04

Please sign in to comment.