Skip to content

Commit

Permalink
Fix a bunch of typos (#455)
Browse files Browse the repository at this point in the history
  • Loading branch information
steffahn authored Dec 14, 2021
1 parent b02ed04 commit 3b5f039
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/backtrace/miri.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Frame {
}

pub fn trace<F: FnMut(&super::Frame) -> 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) };
}
Expand Down
2 changes: 1 addition & 1 deletion src/backtrace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ pub fn trace<F: FnMut(&Frame) -> 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.
///
Expand Down
2 changes: 1 addition & 1 deletion src/print/fuchsia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down
8 changes: 4 additions & 4 deletions src/symbolize/gimli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
}

Expand Down Expand Up @@ -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))
})
Expand Down Expand Up @@ -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<'_>, Symbol<'static>>(sym);
(cb)(&super::Symbol { inner: sym });
Expand Down
4 changes: 2 additions & 2 deletions src/symbolize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
///
Expand All @@ -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.
///
Expand Down

0 comments on commit 3b5f039

Please sign in to comment.