wiggle: fix a couple of typos in lib.rs docs

This commit is contained in:
Craig Pastro
2020-06-23 08:47:13 +09:00
parent f9ef734698
commit cf8cf9a948

View File

@@ -259,7 +259,7 @@ impl<'a, T: ?Sized + Pointee> GuestPtr<'a, T> {
/// Creates a new `GuestPtr` from the given `mem` and `pointer` values.
///
/// Note that for sized types like `u32`, `GuestPtr<T>`, etc, the `pointer`
/// vlue is a `u32` offset into guest memory. For slices and strings,
/// value is a `u32` offset into guest memory. For slices and strings,
/// `pointer` is a `(u32, u32)` offset/length pair.
pub fn new(mem: &'a (dyn GuestMemory + 'a), pointer: T::Pointer) -> GuestPtr<'a, T> {
GuestPtr {
@@ -488,7 +488,7 @@ impl<'a> GuestPtr<'a, str> {
self.pointer.0
}
/// Returns the length, in bytes, of th estring.
/// Returns the length, in bytes, of the string.
pub fn len(&self) -> u32 {
self.pointer.1
}