From 5122a6d9360b5d9c682a261875fb5959df1b9e38 Mon Sep 17 00:00:00 2001 From: Yoshito Komatsu Date: Sun, 18 Oct 2015 16:07:00 +0900 Subject: [PATCH 1/2] Fix some typos --- src/doc/trpl/bibliography.md | 2 +- src/doc/trpl/choosing-your-guarantees.md | 2 +- src/doc/trpl/concurrency.md | 2 +- src/doc/trpl/error-handling.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/doc/trpl/bibliography.md b/src/doc/trpl/bibliography.md index e7b0be01809..ba02053b6b8 100644 --- a/src/doc/trpl/bibliography.md +++ b/src/doc/trpl/bibliography.md @@ -48,7 +48,7 @@ Systems Level Language](http://www.cs.indiana.edu/~eholk/papers/hips2013.pdf). Early GPU work by Eric Holk. * [Parallel closures: a new twist on an old idea](https://www.usenix.org/conference/hotpar12/parallel-closures-new-twist-old-idea) - - not exactly about rust, but by nmatsakis + - not exactly about Rust, but by nmatsakis * [Patina: A Formalization of the Rust Programming Language](ftp://ftp.cs.washington.edu/tr/2015/03/UW-CSE-15-03-02.pdf). Early formalization of a subset of the type system, by Eric Reed. diff --git a/src/doc/trpl/choosing-your-guarantees.md b/src/doc/trpl/choosing-your-guarantees.md index f53ece1f2a7..d9e92de8d9a 100644 --- a/src/doc/trpl/choosing-your-guarantees.md +++ b/src/doc/trpl/choosing-your-guarantees.md @@ -204,7 +204,7 @@ borrow checker. Generally we know that such mutations won't happen in a nested f to check. For large, complicated programs, it becomes useful to put some things in `RefCell`s to make things -simpler. For example, a lot of the maps in [the `ctxt` struct][ctxt] in the rust compiler internals +simpler. For example, a lot of the maps in [the `ctxt` struct][ctxt] in the Rust compiler internals are inside this wrapper. These are only modified once (during creation, which is not right after initialization) or a couple of times in well-separated places. However, since this struct is pervasively used everywhere, juggling mutable and immutable pointers would be hard (perhaps diff --git a/src/doc/trpl/concurrency.md b/src/doc/trpl/concurrency.md index 53afa0e905a..7b3f13a3ed2 100644 --- a/src/doc/trpl/concurrency.md +++ b/src/doc/trpl/concurrency.md @@ -150,7 +150,7 @@ owners! So, we need some type that lets us have more than one reference to a value and that we can share between threads, that is it must implement `Sync`. -We'll use `Arc`, rust's standard atomic reference count type, which +We'll use `Arc`, Rust's standard atomic reference count type, which wraps a value up with some extra runtime bookkeeping which allows us to share the ownership of the value between multiple references at the same time. diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index d839e182092..a2320a82846 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -279,7 +279,7 @@ fn extension(file_name: &str) -> Option<&str> { } ``` -One other pattern that we find is very common is assigning a default value to +One other pattern that we find it very common is assigning a default value to the case when an `Option` value is `None`. For example, maybe your program assumes that the extension of a file is `rs` even if none is present. As you might imagine, the case analysis for this is not specific to file From 5a15144b95201b1cc054138e4473c742da7f1ab5 Mon Sep 17 00:00:00 2001 From: Yoshito Komatsu Date: Mon, 19 Oct 2015 14:23:51 +0900 Subject: [PATCH 2/2] Change to avoid repeated "is" --- src/doc/trpl/error-handling.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/doc/trpl/error-handling.md b/src/doc/trpl/error-handling.md index a2320a82846..bbc827a0d0e 100644 --- a/src/doc/trpl/error-handling.md +++ b/src/doc/trpl/error-handling.md @@ -279,11 +279,11 @@ fn extension(file_name: &str) -> Option<&str> { } ``` -One other pattern that we find it very common is assigning a default value to -the case when an `Option` value is `None`. For example, maybe your program -assumes that the extension of a file is `rs` even if none is present. As you -might imagine, the case analysis for this is not specific to file -extensions - it can work with any `Option`: +One other pattern we commonly find is assigning a default value to the case +when an `Option` value is `None`. For example, maybe your program assumes that +the extension of a file is `rs` even if none is present. As you might imagine, +the case analysis for this is not specific to file extensions - it can work +with any `Option`: ```rust fn unwrap_or(option: Option, default: T) -> T {