We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0683036 commit 67aed3fCopy full SHA for 67aed3f
flatdata-rs/lib/src/rawdata.rs
@@ -20,7 +20,7 @@ impl<'a> RawData<'a> {
20
}
21
22
/// Read a \0 terminated substring starting at specified offset
23
- pub fn substring(&self, start: usize) -> Result<&str, std::str::Utf8Error> {
+ pub fn substring(&self, start: usize) -> Result<&'a str, std::str::Utf8Error> {
24
let suffix = &self.data[start..];
25
match suffix.iter().position(|&c| c == 0) {
26
Some(idx) => std::str::from_utf8(&suffix[..idx]),
0 commit comments