From 355847f5c13be35c12bfe879cadc58d6cbc2798f Mon Sep 17 00:00:00 2001 From: Tshepang Lekhonkhobe Date: Thu, 3 Sep 2015 22:06:23 +0200 Subject: [PATCH] doc: reduce indentation of examples to 4 spaces Also, add trailing commas --- src/liballoc/rc.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index b1fb5be4d21bf..2f92fb7bac5fa 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 = 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>> +//! gadgets: RefCell>>, //! // ...other fields //! } //! //! struct Gadget { //! id: i32, -//! owner: Rc +//! owner: Rc, //! // ...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 = 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.