diff --git a/core/codegen_next/src/parser.rs b/core/codegen_next/src/parser.rs index c1e4ff0a..dd2f0372 100644 --- a/core/codegen_next/src/parser.rs +++ b/core/codegen_next/src/parser.rs @@ -27,9 +27,10 @@ impl Parser { // Our `Parser` is self-referential. We cast a pointer to the heap // allocation as `&'static` to allow the storage of the reference // along-side the allocation. This is safe as long as `buffer` is never - // dropped while `self` lives and an instance or reference to `cursor` - // is never allowed to escape. Both of these properties can be - // confirmed with a cursor look over the method signatures of `Parser`. + // dropped while `self` lives, `buffer` is never mutated, and an + // instance or reference to `cursor` is never allowed to escape. These + // properties can be confirmed with a cursory look over the method + // signatures and implementations of `Parser`. let cursor = unsafe { let buffer: &'static TokenBuffer = ::std::mem::transmute(&*buffer); buffer.begin() diff --git a/core/lib/src/local/request.rs b/core/lib/src/local/request.rs index 089ee73f..43f4acb9 100644 --- a/core/lib/src/local/request.rs +++ b/core/lib/src/local/request.rs @@ -91,10 +91,10 @@ pub struct LocalRequest<'c> { // `Send` nor `Sync`. The second is more difficult to argue. First, observe // that any methods of `LocalRequest` that _remove_ values from `Request` // only remove _Copy_ values, in particular, `SocketAddr`. Second, the - // lifetime of the `Request` object is tied tot he lifetime of the + // lifetime of the `Request` object is tied to the lifetime of the // `LocalResponse`, so references from `Request` cannot be dangling in // `Response`. And finally, observe how all of the data stored in `Request` - // is convered into its owned counterpart before insertion, ensuring stable + // is converted into its owned counterpart before insertion, ensuring stable // addresses. Together, these properties guarantee the second condition. request: Rc>, data: Vec