File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 112112//!
113113//! // Despite dropping `gadget_owner`, we're still able to print out the name
114114//! // of the `Owner` of the `Gadget`s. This is because we've only dropped a
115- //! // single `Rc<Owner>`, not the `Owner` allocation it points to. As long as there are
115+ //! // single `Rc<Owner>`, not the `Owner` it points to. As long as there are
116116//! // other `Rc<Owner>` pointing at the same `Owner` allocation, it will remain
117- //! // allocated . The field projection `gadget1.owner.name` works because
117+ //! // live . The field projection `gadget1.owner.name` works because
118118//! // `Rc<Owner>` automatically dereferences to `Owner`.
119119//! println!("Gadget {} owned by {}", gadget1.id, gadget1.owner.name);
120120//! println!("Gadget {} owned by {}", gadget2.id, gadget2.owner.name);
You can’t perform that action at this time.
0 commit comments