This is an automated email from the ASF dual-hosted git repository.

ivila pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-teaclave-trustzone-sdk.git


The following commit(s) were added to refs/heads/main by this push:
     new 532803d  Remove unwrap in test case
532803d is described below

commit 532803dd9b27ec58d41867eca1edf317183fbabb
Author: Fredrik Simonsson <[email protected]>
AuthorDate: Fri May 9 14:42:45 2025 +0200

    Remove unwrap in test case
    
    Acked-by: Zehui Chen <[email protected]>
    Signed-off-by: Fredrik Simonsson <[email protected]>
---
 optee-teec/src/uuid.rs | 6 +++---
 optee-utee/src/uuid.rs | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/optee-teec/src/uuid.rs b/optee-teec/src/uuid.rs
index 163afdd..727742d 100644
--- a/optee-teec/src/uuid.rs
+++ b/optee-teec/src/uuid.rs
@@ -149,9 +149,9 @@ mod tests {
             "11173366-2aca-19bc-beb7-10c975e6131e", // random uuid
         ];
         for origin in uuids.iter() {
-            let uuid = Uuid::parse_str(origin).unwrap();
-            let formatted = uuid.to_string();
-            assert_eq!(origin, &formatted);
+            let uuid = Uuid::parse_str(origin);
+            let formatted = uuid.map(|x| x.to_string());
+            assert_eq!(Ok(origin.to_string()), formatted);
         }
     }
 }
diff --git a/optee-utee/src/uuid.rs b/optee-utee/src/uuid.rs
index 64527f7..4017943 100644
--- a/optee-utee/src/uuid.rs
+++ b/optee-utee/src/uuid.rs
@@ -130,9 +130,9 @@ mod tests {
             "11173366-2aca-19bc-beb7-10c975e6131e", // random uuid
         ];
         for origin in uuids.iter() {
-            let uuid = Uuid::parse_str(origin).unwrap();
-            let formatted = uuid.to_string();
-            assert_eq!(origin, &formatted);
+            let uuid = Uuid::parse_str(origin);
+            let formatted = uuid.map(|x| x.to_string());
+            assert_eq!(Ok(origin.to_string()), formatted);
         }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to