diff options
| author | Steve Klabnik <steve@steveklabnik.com> | 2015-09-03 20:10:08 -0400 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-09-03 20:10:08 -0400 |
| commit | 1401b46daa4aefb20b6557ac3b9bae1debffde02 (patch) | |
| tree | 5ce0770aa58261d829a09ad90075d68acc417dad /src | |
| parent | ff7f5cd0c6fbb575dfa1dceaeed6f18201332e22 (diff) | |
| parent | 355847f5c13be35c12bfe879cadc58d6cbc2798f (diff) | |
| download | rust-1401b46daa4aefb20b6557ac3b9bae1debffde02.tar.gz rust-1401b46daa4aefb20b6557ac3b9bae1debffde02.zip | |
Rollup merge of #28209 - tshepang:must-be-four-spaces, r=steveklabnik
Also, add trailing commas
Diffstat (limited to 'src')
| -rw-r--r-- | src/liballoc/rc.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index b1fb5be4d21..2f92fb7bac5 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -51,7 +51,7 @@ //! fn main() { //! // Create a reference counted Owner. //! let gadget_owner : Rc<Owner> = Rc::new( -//! Owner { name: String::from("Gadget Man") } +//! Owner { name: String::from("Gadget Man") } //! ); //! //! // Create Gadgets belonging to gadget_owner. To increment the reference @@ -102,13 +102,13 @@ //! //! struct Owner { //! name: String, -//! gadgets: RefCell<Vec<Weak<Gadget>>> +//! gadgets: RefCell<Vec<Weak<Gadget>>>, //! // ...other fields //! } //! //! struct Gadget { //! id: i32, -//! owner: Rc<Owner> +//! owner: Rc<Owner>, //! // ...other fields //! } //! @@ -117,10 +117,10 @@ //! // Owner's vector of Gadgets inside a RefCell so that we can mutate it //! // through a shared reference. //! let gadget_owner : Rc<Owner> = Rc::new( -//! Owner { -//! name: "Gadget Man".to_string(), -//! gadgets: RefCell::new(Vec::new()) -//! } +//! Owner { +//! name: "Gadget Man".to_string(), +//! gadgets: RefCell::new(Vec::new()), +//! } //! ); //! //! // Create Gadgets belonging to gadget_owner as before. |
