File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ Systems Level
4848Language] ( http://www.cs.indiana.edu/~eholk/papers/hips2013.pdf ) . Early GPU work by Eric Holk.
4949* [ Parallel closures: a new twist on an old
5050 idea] ( https://www.usenix.org/conference/hotpar12/parallel-closures-new-twist-old-idea )
51- - not exactly about rust , but by nmatsakis
51+ - not exactly about Rust , but by nmatsakis
5252* [ Patina: A Formalization of the Rust Programming
5353 Language] ( ftp://ftp.cs.washington.edu/tr/2015/03/UW-CSE-15-03-02.pdf ) . Early
5454 formalization of a subset of the type system, by Eric Reed.
Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ borrow checker. Generally we know that such mutations won't happen in a nested f
204204to check.
205205
206206For large, complicated programs, it becomes useful to put some things in ` RefCell ` s to make things
207- simpler. For example, a lot of the maps in [ the ` ctxt ` struct] [ ctxt ] in the rust compiler internals
207+ simpler. For example, a lot of the maps in [ the ` ctxt ` struct] [ ctxt ] in the Rust compiler internals
208208are inside this wrapper. These are only modified once (during creation, which is not right after
209209initialization) or a couple of times in well-separated places. However, since this struct is
210210pervasively used everywhere, juggling mutable and immutable pointers would be hard (perhaps
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ owners!
150150So, we need some type that lets us have more than one reference to a value and
151151that we can share between threads, that is it must implement ` Sync ` .
152152
153- We'll use ` Arc<T> ` , rust 's standard atomic reference count type, which
153+ We'll use ` Arc<T> ` , Rust 's standard atomic reference count type, which
154154wraps a value up with some extra runtime bookkeeping which allows us to
155155share the ownership of the value between multiple references at the same time.
156156
Original file line number Diff line number Diff line change @@ -279,11 +279,11 @@ fn extension(file_name: &str) -> Option<&str> {
279279}
280280```
281281
282- One other pattern that we find is very common is assigning a default value to
283- the case when an ` Option ` value is ` None ` . For example, maybe your program
284- assumes that the extension of a file is ` rs ` even if none is present. As you
285- might imagine, the case analysis for this is not specific to file
286- extensions - it can work with any ` Option<T> ` :
282+ One other pattern we commonly find is assigning a default value to the case
283+ when an ` Option ` value is ` None ` . For example, maybe your program assumes that
284+ the extension of a file is ` rs ` even if none is present. As you might imagine,
285+ the case analysis for this is not specific to file extensions - it can work
286+ with any ` Option<T> ` :
287287
288288``` rust
289289fn unwrap_or <T >(option : Option <T >, default : T ) -> T {
You can’t perform that action at this time.
0 commit comments