DemesneGH commented on code in PR #170:
URL: 
https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/170#discussion_r1971324633


##########
examples/supp_plugin-rs/proto/src/lib.rs:
##########
@@ -16,40 +16,28 @@
 // under the License.
 
 #![no_std]
+use num_enum::{FromPrimitive, IntoPrimitive};
 
+#[derive(FromPrimitive, IntoPrimitive)]
+#[repr(u32)]
 pub enum Command {
     Ping,
+    #[default]
     Unknown,
 }
 
-impl From<u32> for Command {
-    #[inline]
-    fn from(value: u32) -> Command {
-        match value {
-            0 => Command::Ping,
-            _ => Command::Unknown,
-        }
-    }
-}
-
-pub const TA_UUID: &str = &include_str!(concat!(env!("OUT_DIR"), 
"/ta_uuid.txt"));
+// You can use `truncate -s 36 uuid.txt` to remove the extra newline at the 
end 
+// of `uuid.txt`.

Review Comment:
   prefer more details such as:
   If `Uuid::parse_str()` returns an InvalidLength error, there may be an extra 
newline in your `uuid.txt` file. You can remove it by running `truncate -s 36 
uuid.txt`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to