Skip to content

Commit

Permalink
Cargo.lock sync
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallets committed Dec 1, 2023
1 parent e533aaa commit 53894e1
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 31 deletions.
53 changes: 28 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions zenoh-plugin-ros2dds/src/gid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,17 @@ mod tests {
0x01, 0xc1,
];

assert_eq!(Gid::from(bytes1.clone()).deref(), &bytes1);
assert_eq!(Gid::from(bytes1).deref(), &bytes1);
assert_eq!(Gid::from(&bytes1).deref(), &bytes1);
assert_eq!(Gid::from_str(str1).unwrap().deref(), &bytes1);
assert_eq!(Gid::from(bytes1.clone()).to_string(), str1);
assert_eq!(Gid::from(bytes1).to_string(), str1);
assert_eq!(Gid::from(&bytes1).to_string(), str1);
assert_eq!(Gid::from_str(str1).unwrap().to_string(), str1);

let str2: &str = "01106c8324a780d1b9e62c8f00000e04";
assert!(Gid::from_str(str2).unwrap() > Gid::from_str(str1).unwrap());

assert!(matches!(
Gid::from_str("01106c8324a780d1b9e62c8f00000e04aaaaaaaa"),
Err(_)
));
assert!(Gid::from_str("01106c8324a780d1b9e62c8f00000e04aaaaaaaa").is_err());
}

#[test]
Expand Down

0 comments on commit 53894e1

Please sign in to comment.