1 2 3 4 5 6 7 8 9
use anyhow::Error; use crate::types::ResultAnyError; pub(crate) fn bytes_to_string(v: Vec<u8>) -> ResultAnyError<String> { return std::str::from_utf8(&v) .map(String::from) .map_err(Error::from); }