core compatibility fix
All checks were successful
Rust/spacepackets/pipeline/head This commit looks good
Rust/spacepackets/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-07-02 17:25:10 +02:00
parent 188651c4a4
commit ae8fb8ee14
Signed by: muellerr
GPG Key ID: A649FB78196E3849

View File

@ -100,7 +100,7 @@ impl<'data> Lv<'data> {
/// known to contain a [str], for example being a file name. /// known to contain a [str], for example being a file name.
pub fn value_as_str(&self) -> Option<Result<&'data str, Utf8Error>> { pub fn value_as_str(&self) -> Option<Result<&'data str, Utf8Error>> {
self.data?; self.data?;
Some(std::str::from_utf8(self.data.unwrap())) Some(core::str::from_utf8(self.data.unwrap()))
} }
/// Writes the LV to a raw buffer. Please note that the first byte will contain the length /// Writes the LV to a raw buffer. Please note that the first byte will contain the length