wiggle: fix a couple of typos in lib.rs docs
This commit is contained in:
@@ -259,7 +259,7 @@ impl<'a, T: ?Sized + Pointee> GuestPtr<'a, T> {
|
|||||||
/// Creates a new `GuestPtr` from the given `mem` and `pointer` values.
|
/// Creates a new `GuestPtr` from the given `mem` and `pointer` values.
|
||||||
///
|
///
|
||||||
/// Note that for sized types like `u32`, `GuestPtr<T>`, etc, the `pointer`
|
/// 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.
|
/// `pointer` is a `(u32, u32)` offset/length pair.
|
||||||
pub fn new(mem: &'a (dyn GuestMemory + 'a), pointer: T::Pointer) -> GuestPtr<'a, T> {
|
pub fn new(mem: &'a (dyn GuestMemory + 'a), pointer: T::Pointer) -> GuestPtr<'a, T> {
|
||||||
GuestPtr {
|
GuestPtr {
|
||||||
@@ -488,7 +488,7 @@ impl<'a> GuestPtr<'a, str> {
|
|||||||
self.pointer.0
|
self.pointer.0
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns the length, in bytes, of th estring.
|
/// Returns the length, in bytes, of the string.
|
||||||
pub fn len(&self) -> u32 {
|
pub fn len(&self) -> u32 {
|
||||||
self.pointer.1
|
self.pointer.1
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user