File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ pub trait AsRef<T: ?Sized> {
180
180
/// write a function `add_one`that takes all arguments that can be converted to `&mut u64`.
181
181
/// Because [`Box<T>`] implements `AsMut<T>` `add_one` accepts arguments of type
182
182
/// `&mut Box<u64>` as well:
183
+ ///
183
184
/// ```
184
185
/// fn add_one<T: AsMut<u64>>(num: &mut T) {
185
186
/// *num.as_mut() += 1;
@@ -189,8 +190,8 @@ pub trait AsRef<T: ?Sized> {
189
190
/// add_one(&mut boxed_num);
190
191
/// assert_eq!(*boxed_num, 1);
191
192
/// ```
192
- /// [`Box<T>`]: ../../std/boxed/struct.Box.html
193
193
///
194
+ /// [`Box<T>`]: ../../std/boxed/struct.Box.html
194
195
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
195
196
pub trait AsMut < T : ?Sized > {
196
197
/// Performs the conversion.
You can’t perform that action at this time.
0 commit comments