From e3034cc46c040399f253f63cbf867ec6f0e6c541 Mon Sep 17 00:00:00 2001 From: Frank Steffahn Date: Tue, 14 Dec 2021 16:32:06 +0100 Subject: [PATCH] Fix a bunch of typos --- src/backtrace/miri.rs | 2 +- src/backtrace/mod.rs | 2 +- src/print/fuchsia.rs | 2 +- src/symbolize/gimli.rs | 8 ++++---- src/symbolize/mod.rs | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/backtrace/miri.rs b/src/backtrace/miri.rs index bcf435588..5bd9aaa40 100644 --- a/src/backtrace/miri.rs +++ b/src/backtrace/miri.rs @@ -46,7 +46,7 @@ impl Frame { } pub fn trace bool>(cb: F) { - // SAFETY: Miri guarnatees that the backtrace API functions + // SAFETY: Miri guarantees that the backtrace API functions // can be called from any thread. unsafe { trace_unsynchronized(cb) }; } diff --git a/src/backtrace/mod.rs b/src/backtrace/mod.rs index ca1e9148e..93355d744 100644 --- a/src/backtrace/mod.rs +++ b/src/backtrace/mod.rs @@ -55,7 +55,7 @@ pub fn trace bool>(cb: F) { /// Same as `trace`, only unsafe as it's unsynchronized. /// -/// This function does not have synchronization guarentees but is available +/// This function does not have synchronization guarantees but is available /// when the `std` feature of this crate isn't compiled in. See the `trace` /// function for more documentation and examples. /// diff --git a/src/print/fuchsia.rs b/src/print/fuchsia.rs index 8ad98fb47..60e1191f6 100644 --- a/src/print/fuchsia.rs +++ b/src/print/fuchsia.rs @@ -286,7 +286,7 @@ struct Dso<'a> { /// of a shared object it will be the soname (see DT_SONAME). name: &'a str, /// On Fuchsia virtually all binaries have build IDs but this is not a strict - /// requierment. There's no way to match up DSO information with a real ELF + /// requirements. There's no way to match up DSO information with a real ELF /// file afterwards if there is no build_id so we require that every DSO /// have one here. DSO's without a build_id are ignored. build_id: &'a [u8], diff --git a/src/symbolize/gimli.rs b/src/symbolize/gimli.rs index a9495cce7..5f10122dd 100644 --- a/src/symbolize/gimli.rs +++ b/src/symbolize/gimli.rs @@ -205,7 +205,7 @@ struct Cache { /// Mappings cache where we retain parsed dwarf information. /// - /// This list has a fixed capacity for its entire liftime which never + /// This list has a fixed capacity for its entire lifetime which never /// increases. The `usize` element of each pair is an index into `libraries` /// above where `usize::max_value()` represents the current executable. The /// `Mapping` is corresponding parsed dwarf information. @@ -232,7 +232,7 @@ struct LibrarySegment { /// actually where the segment is loaded, but rather this address plus the /// containing library's `bias` is where to find it. stated_virtual_memory_address: usize, - /// The size of ths segment in memory. + /// The size of this segment in memory. len: usize, } @@ -293,7 +293,7 @@ impl Cache { } // Now that we know `lib` contains `addr`, we can offset with - // the bias to find the stated virutal memory address. + // the bias to find the stated virtual memory address. let svma = (addr as usize).wrapping_sub(lib.bias); Some((i, svma as *const u8)) }) @@ -337,7 +337,7 @@ pub unsafe fn resolve(what: ResolveWhat<'_>, cb: &mut dyn FnMut(&super::Symbol)) let addr = what.address_or_ip(); let mut call = |sym: Symbol<'_>| { // Extend the lifetime of `sym` to `'static` since we are unfortunately - // required to here, but it's ony ever going out as a reference so no + // required to here, but it's only ever going out as a reference so no // reference to it should be persisted beyond this frame anyway. let sym = mem::transmute::, Symbol<'static>>(sym); (cb)(&super::Symbol { inner: sym }); diff --git a/src/symbolize/mod.rs b/src/symbolize/mod.rs index 20ba4207f..dbc346522 100644 --- a/src/symbolize/mod.rs +++ b/src/symbolize/mod.rs @@ -148,7 +148,7 @@ fn adjust_ip(a: *mut c_void) -> *mut c_void { /// Same as `resolve`, only unsafe as it's unsynchronized. /// -/// This function does not have synchronization guarentees but is available when +/// This function does not have synchronization guarantees but is available when /// the `std` feature of this crate isn't compiled in. See the `resolve` /// function for more documentation and examples. /// @@ -164,7 +164,7 @@ where /// Same as `resolve_frame`, only unsafe as it's unsynchronized. /// -/// This function does not have synchronization guarentees but is available +/// This function does not have synchronization guarantees but is available /// when the `std` feature of this crate isn't compiled in. See the /// `resolve_frame` function for more documentation and examples. ///