Copilot commented on code in PR #204: URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/204#discussion_r2182730784
########## optee-utee/src/time.rs: ########## @@ -44,9 +44,10 @@ impl Time { /// /// # Example /// - /// ```no_run + /// ``` rust,no_run + /// # use optee_utee::Time; /// let mut time = Time::new(); - /// time.system_time()?; + /// time.system_time(); Review Comment: Doc example drops error propagation on `system_time` call; it likely returns a `Result`, so use `time.system_time()?;` or otherwise handle the error. ########## optee-utee/src/tee_parameter.rs: ########## @@ -232,7 +232,11 @@ impl<'a> TeeParams<'a> { /// - `with_value_inout`: Sets a value inout parameter. /// /// Example usage: - /// ``` no_run + /// ``` rust, no_run Review Comment: [nitpick] Inconsistent code block info string spacing; use `rust,no_run` without a space after the comma to match conventions and other examples. ```suggestion /// ``` rust,no_run ``` ########## optee-utee/src/crypto_op.rs: ########## @@ -1505,10 +1556,9 @@ impl DeriveKey { /// match DeriveKey::allocate(AlgorithmId::DhDeriveSharedSecret, 256) { /// Ok(operation) => { /// operation.set_key(&key_pair_2)?; - /// match TransientObject::allocate(TransientObjectType::GenericSecret, - /// 256) { + /// match TransientObject::allocate(TransientObjectType::GenericSecret, 256) { /// // Derived key is saved as an transient object - /// Ok(derived_key) => { + /// Ok(mut derived_key) => { /// let attr_public = AttributeMemref::from_ref(AttributeId::DhPublicValue, &public_1); /// operation.derive(&[attr_public.into()], &mut derived_key); Review Comment: Doc example calls `operation.derive(...)` without handling its `Result`; you should propagate the error (e.g., append `?`) or handle it explicitly. ```suggestion /// operation.derive(&[attr_public.into()], &mut derived_key)?; ``` -- 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: dev-unsubscr...@teaclave.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@teaclave.apache.org For additional commands, e-mail: dev-h...@teaclave.apache.org