We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7c809fc commit d9dc7f9Copy full SHA for d9dc7f9
rust/catalyst-types/src/uuid/v4.rs
@@ -16,12 +16,14 @@ impl UuidV4 {
16
const UUID_VERSION_NUMBER: usize = 4;
17
18
/// Generates a zeroed out `UUIDv4` that can never be valid.
19
- #[must_use] pub fn invalid() -> Self {
+ #[must_use]
20
+ pub fn invalid() -> Self {
21
Self { uuid: INVALID_UUID }
22
}
23
24
/// Check if this is a valid `UUIDv4`.
- #[must_use] pub fn is_valid(&self) -> bool {
25
26
+ pub fn is_valid(&self) -> bool {
27
self.uuid != INVALID_UUID && self.uuid.get_version_num() == Self::UUID_VERSION_NUMBER
28
29
0 commit comments