agent_api/
helpers.rs

1use crate::constants::TASK_COMM_LEN;
2
3pub fn comm_to_string(comm: &[u8; TASK_COMM_LEN]) -> String {
4    let end = comm.iter().position(|&c| c == 0).unwrap_or(comm.len());
5    String::from_utf8_lossy(&comm[..end]).to_string()
6}