Skip to content

Commit

Permalink
fix fmt
Browse files Browse the repository at this point in the history
Signed-off-by: Hunar Roop Kahlon <hunar.roop@gmail.com>
  • Loading branch information
kinggoesgaming committed Jul 23, 2018
1 parent e90f51d commit 9542348
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion src/core_support.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ impl fmt::Display for UuidVariant {

impl fmt::Display for ::UuidError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "invalid bytes length: expected {}, found {}", self.expected(), self.found())
write!(
f,
"invalid bytes length: expected {}, found {}",
self.expected(),
self.found()
)
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ impl Uuid {
let len = d4.len();

if len != D4_LEN {
return Err(UuidError::new(D4_LEN, len))
return Err(UuidError::new(D4_LEN, len));
}

Ok(Uuid::from_uuid_bytes([
Expand Down Expand Up @@ -471,7 +471,7 @@ impl Uuid {
/// let bytes = [4, 54, 67, 12, 43, 2, 98, 76];
///
/// let uuid = Uuid::from_bytes(&bytes);
///
///
/// let expected_uuid = Err(uuid::UuidError::new(16, 8));
///
/// assert_eq!(expected_uuid, uuid);
Expand All @@ -482,7 +482,7 @@ impl Uuid {
let len = b.len();

if len != BYTES_LEN {
return Err(UuidError::new(BYTES_LEN, len))
return Err(UuidError::new(BYTES_LEN, len));
}

let mut bytes: UuidBytes = [0; 16];
Expand Down
4 changes: 2 additions & 2 deletions src/v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ impl Uuid {
T: UuidClockSequence,
{
const NODE_ID_LEN: usize = 6;

let len = node_id.len();
if len != NODE_ID_LEN {
return Err(::UuidError::new(NODE_ID_LEN, len))
return Err(::UuidError::new(NODE_ID_LEN, len));
}

let time_low;
Expand Down

0 comments on commit 9542348

Please sign in to comment.