DemesneGH commented on code in PR #164: URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/pull/164#discussion_r1923662576
########## examples/tcp_client-rs/ta/src/main.rs: ########## @@ -15,16 +15,27 @@ // specific language governing permissions and limitations // under the License. +#![cfg_attr(not(target_os = "optee"), no_std)] #![no_main] +cfg_block::cfg_block! { + if #[cfg(target_os = "optee")] { Review Comment: Can we have some short comment to explain the `if else` block for developers? They may be confused about the `target_os = "optee"` constraints, we can just clarify they represent `no-std` and `std`. ########## examples/tcp_client-rs/ta/src/main.rs: ########## @@ -15,16 +15,27 @@ // specific language governing permissions and limitations // under the License. +#![cfg_attr(not(target_os = "optee"), no_std)] #![no_main] +cfg_block::cfg_block! { + if #[cfg(target_os = "optee")] { + use std::io::{Read, Write}; + } else { + extern crate alloc; + use optee_utee::net::{StdCompactConnect, StdCompactWrite, StdCompactRead}; + use alloc::vec::Vec; + use alloc::string::String; + } +} + + Review Comment: Seems one redundant blank line here -- 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