File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
rust/catalyst-types/src/uuid Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ pub fn decode_cbor_uuid(val: &coset::cbor::Value) -> anyhow::Result<uuid::Uuid>
2424 . map_err ( |_| anyhow:: anyhow!( "Invalid CBOR encoded UUID type, invalid bytes size" ) ) ?,
2525 ) ;
2626 Ok ( uuid)
27- }
27+ }
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ impl UuidV4 {
1616 const UUID_VERSION_NUMBER : usize = 4 ;
1717
1818 /// Generates a zeroed out `UUIDv4` that can never be valid.
19- pub fn invalid ( ) -> Self {
19+ # [ must_use ] pub fn invalid ( ) -> Self {
2020 Self { uuid : INVALID_UUID }
2121 }
2222
2323 /// Check if this is a valid `UUIDv4`.
24- pub fn is_valid ( & self ) -> bool {
24+ # [ must_use ] pub fn is_valid ( & self ) -> bool {
2525 self . uuid != INVALID_UUID && self . uuid . get_version_num ( ) == Self :: UUID_VERSION_NUMBER
2626 }
2727
@@ -64,4 +64,4 @@ impl From<uuid::Uuid> for UuidV4 {
6464 fn from ( uuid : uuid:: Uuid ) -> Self {
6565 Self { uuid }
6666 }
67- }
67+ }
Original file line number Diff line number Diff line change @@ -66,4 +66,4 @@ impl From<uuid::Uuid> for UuidV7 {
6666 fn from ( uuid : uuid:: Uuid ) -> Self {
6767 Self { uuid }
6868 }
69- }
69+ }
You can’t perform that action at this time.
0 commit comments