Navigation Menu

Skip to content

Commit

Permalink
doc: reduce indentation of examples to 4 spaces
Browse files Browse the repository at this point in the history
Also, add trailing commas
  • Loading branch information
tshepang committed Sep 3, 2015
1 parent 1661947 commit 355847f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/liballoc/rc.rs
Expand Up @@ -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
Expand Down Expand Up @@ -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
//! }
//!
Expand All @@ -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.
Expand Down

0 comments on commit 355847f

Please sign in to comment.