Skip to content

Commit

Permalink
Typos
Browse files Browse the repository at this point in the history
  • Loading branch information
purplesyringa committed Nov 4, 2024
1 parent 5a96f73 commit 06bcd7a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Lightweight exceptions.

Lithium provides a custom exception mechanism as an alternative to Rust panics. Compared to Rust panics, this mechanism is allocation-free, avoids indirections and RTTI, and hence faster, if less applicable.
Lithium provides a custom exception mechanism as an alternative to Rust panics. Compared to Rust panics, this mechanism is allocation-free, avoids indirections and RTTI, and is hence faster, if less applicable.

On nightly, Lithium is more than 2x faster than Rust panics on common `Result`-like usecases. See the [benchmark](benches/bench.rs).

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Lightweight exceptions.
//!
//! Lithium provides a custom exception mechanism as an alternative to Rust panics. Compared to Rust
//! panics, this mechanism is allocation-free, avoids indirections and RTTI, and hence faster, if
//! panics, this mechanism is allocation-free, avoids indirections and RTTI, and is hence faster, if
//! less applicable.
//!
//! On nightly, Lithium is more than 2x faster than Rust panics on common `Result`-like usecases.
Expand Down Expand Up @@ -53,7 +53,7 @@
//! match exactly. Note that the functions are generic, and if the type is inferred wrong, UB will
//! happen. Use turbofish to avoid this pitfall.
//!
//! The matching types requirement only apply to exceptions that aren't caught inside the
//! The matching types requirement only applies to exceptions that aren't caught inside the
//! [`catch`]/[`intercept`] callback. For example, this is sound:
//!
//! ```rust
Expand All @@ -70,7 +70,7 @@
//! }
//! ```
//!
//! The responsibility of holding this safety requirement is split between the throwing and the
//! The responsibility of upholding this safety requirement is split between the throwing and the
//! catching functions. All throwing functions must be `unsafe`, listing "only caught by type `E`"
//! as a safety requirement. All catching functions that take a user-supplied callback must be
//! `unsafe` too, listing "callback only throws type `E`" as a safety requirement.
Expand Down

0 comments on commit 06bcd7a

Please sign in to comment.