doc: reduce indentation of examples to 4 spaces
Also, add trailing commas
This commit is contained in:
parent
1661947014
commit
355847f5c1
1 changed files with 7 additions and 7 deletions
|
@ -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
|
||||
//! }
|
||||
//!
|
||||
|
@ -119,7 +119,7 @@
|
|||
//! let gadget_owner : Rc<Owner> = Rc::new(
|
||||
//! Owner {
|
||||
//! name: "Gadget Man".to_string(),
|
||||
//! gadgets: RefCell::new(Vec::new())
|
||||
//! gadgets: RefCell::new(Vec::new()),
|
||||
//! }
|
||||
//! );
|
||||
//!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue