@@ -566,8 +566,7 @@ impl<T> Option<T> {
566566 // Setting a new value
567567 /////////////////////////////////////////////////////////////////////////
568568
569- /// Inserts `v` into the option then returns a mutable reference
570- /// to the contained value.
569+ /// Inserts `value` into the option then returns a mutable reference to it.
571570 ///
572571 /// # Example
573572 ///
@@ -585,8 +584,8 @@ impl<T> Option<T> {
585584 /// ```
586585 #[ inline]
587586 #[ unstable( feature = "option_insert" , reason = "newly added" , issue = "none" ) ]
588- pub fn insert ( & mut self , val : T ) -> & mut T {
589- * self = Some ( val ) ;
587+ pub fn insert ( & mut self , value : T ) -> & mut T {
588+ * self = Some ( value ) ;
590589
591590 match self {
592591 Some ( v) => v,
@@ -825,7 +824,7 @@ impl<T> Option<T> {
825824 // Entry-like operations to insert if None and return a reference
826825 /////////////////////////////////////////////////////////////////////////
827826
828- /// Inserts `v ` into the option if it is [`None`], then
827+ /// Inserts `value ` into the option if it is [`None`], then
829828 /// returns a mutable reference to the contained value.
830829 ///
831830 /// # Examples
@@ -844,12 +843,12 @@ impl<T> Option<T> {
844843 /// ```
845844 #[ inline]
846845 #[ stable( feature = "option_entry" , since = "1.20.0" ) ]
847- pub fn get_or_insert ( & mut self , val : T ) -> & mut T {
848- self . get_or_insert_with ( || val )
846+ pub fn get_or_insert ( & mut self , value : T ) -> & mut T {
847+ self . get_or_insert_with ( || value )
849848 }
850849
851- /// Inserts a value computed from `f` into the option if it is [`None`], then
852- /// returns a mutable reference to the contained value.
850+ /// Inserts a value computed from `f` into the option if it is [`None`],
851+ /// then returns a mutable reference to the contained value.
853852 ///
854853 /// # Examples
855854 ///
0 commit comments