wiggle: fix lifetime in as_str_ptr

This commit is contained in:
Craig Pastro
2020-06-24 09:10:59 +09:00
parent cf8cf9a948
commit 7699c4d6e3

View File

@@ -536,7 +536,7 @@ impl<'a> GuestPtr<'a, str> {
impl<'a> GuestPtr<'a, [u8]> {
/// Returns a raw pointer to the string represented by a `[u8]` without
/// validating whether each u8 is a utf-8 codepoint.
pub fn as_str_ptr(&self) -> GuestPtr<str> {
pub fn as_str_ptr(&self) -> GuestPtr<'a, str> {
GuestPtr::new(self.mem, self.pointer)
}
}