From 13cf920e0863c13983f8c7224d7c74404d210327 Mon Sep 17 00:00:00 2001 From: geekvest <126322776+geekvest@users.noreply.github.com> Date: Wed, 6 Mar 2024 05:28:55 +0800 Subject: [PATCH] Fix some typos (#1864) Signed-off-by: geekvest --- src/exercises/chromium/build-rules.md | 2 +- src/slices-and-lifetimes/lifetime-annotations.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exercises/chromium/build-rules.md b/src/exercises/chromium/build-rules.md index 50e9bab0..80e8ae1c 100644 --- a/src/exercises/chromium/build-rules.md +++ b/src/exercises/chromium/build-rules.md @@ -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 diff --git a/src/slices-and-lifetimes/lifetime-annotations.md b/src/slices-and-lifetimes/lifetime-annotations.md index b90188d5..d1df6e79 100644 --- a/src/slices-and-lifetimes/lifetime-annotations.md +++ b/src/slices-and-lifetimes/lifetime-annotations.md @@ -44,7 +44,7 @@ fn main() {
-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