1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-03-22 14:59:37 +02:00

Fix some typos (#1864)

Signed-off-by: geekvest <cuimoman@sohu.com>
This commit is contained in:
geekvest 2024-03-06 05:28:55 +08:00 committed by GitHub
parent 259a8ac08e
commit 13cf920e08
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ pub extern "C" fn hello_from_rust() {
```
**Important**: note that `no_mangle` here is considered a type of unsafety by
the Rust compiler, so you'll need to to allow unsafe code in your `gn` target.
the Rust compiler, so you'll need to allow unsafe code in your `gn` target.
Add this new Rust target as a dependency of `//ui/base:base`. Declare this
function at the top of `ui/base/resource/resource_bundle.cc` (later, we'll see

View File

@ -44,7 +44,7 @@ fn main() {
<details>
In this example, the the compiler does not know what lifetime to infer for `p3`.
In this example, the compiler does not know what lifetime to infer for `p3`.
Looking inside the function body shows that it can only safely assume that
`p3`'s lifetime is the shorter of `p1` and `p2`. But just like types, Rust
requires explicit annotations of lifetimes on function arguments and return