@@ -256,26 +256,26 @@ impl Ordering {
256256 ///
257257 /// use std::cmp::Ordering;
258258 ///
259- /// let result = Ordering::Equal.or (Ordering::Less);
259+ /// let result = Ordering::Equal.then (Ordering::Less);
260260 /// assert_eq!(result, Ordering::Less);
261261 ///
262- /// let result = Ordering::Less.or (Ordering::Equal);
262+ /// let result = Ordering::Less.then (Ordering::Equal);
263263 /// assert_eq!(result, Ordering::Less);
264264 ///
265- /// let result = Ordering::Less.or (Ordering::Greater);
265+ /// let result = Ordering::Less.then (Ordering::Greater);
266266 /// assert_eq!(result, Ordering::Less);
267267 ///
268- /// let result = Ordering::Equal.or (Ordering::Equal);
268+ /// let result = Ordering::Equal.then (Ordering::Equal);
269269 /// assert_eq!(result, Ordering::Equal);
270270 ///
271271 /// let x: (i64, i64, i64) = (1, 2, 7);
272272 /// let y: (i64, i64, i64) = (1, 5, 3);
273- /// let result = x.0.cmp(&y.0).or (x.1.cmp(&y.1)).or (x.2.cmp(&y.2));
273+ /// let result = x.0.cmp(&y.0).then (x.1.cmp(&y.1)).then (x.2.cmp(&y.2));
274274 ///
275275 /// assert_eq!(result, Ordering::Less);
276276 /// ```
277277 #[ unstable( feature = "ordering_chaining" , issue = "37053" ) ]
278- pub fn or ( self , other : Ordering ) -> Ordering {
278+ pub fn then ( self , other : Ordering ) -> Ordering {
279279 match self {
280280 Equal => other,
281281 _ => self ,
@@ -294,26 +294,26 @@ impl Ordering {
294294 ///
295295 /// use std::cmp::Ordering;
296296 ///
297- /// let result = Ordering::Equal.or_else (|| Ordering::Less);
297+ /// let result = Ordering::Equal.then_with (|| Ordering::Less);
298298 /// assert_eq!(result, Ordering::Less);
299299 ///
300- /// let result = Ordering::Less.or_else (|| Ordering::Equal);
300+ /// let result = Ordering::Less.then_with (|| Ordering::Equal);
301301 /// assert_eq!(result, Ordering::Less);
302302 ///
303- /// let result = Ordering::Less.or_else (|| Ordering::Greater);
303+ /// let result = Ordering::Less.then_with (|| Ordering::Greater);
304304 /// assert_eq!(result, Ordering::Less);
305305 ///
306- /// let result = Ordering::Equal.or_else (|| Ordering::Equal);
306+ /// let result = Ordering::Equal.then_with (|| Ordering::Equal);
307307 /// assert_eq!(result, Ordering::Equal);
308308 ///
309309 /// let x: (i64, i64, i64) = (1, 2, 7);
310310 /// let y: (i64, i64, i64) = (1, 5, 3);
311- /// let result = x.0.cmp(&y.0).or_else (|| x.1.cmp(&y.1)).or_else (|| x.2.cmp(&y.2));
311+ /// let result = x.0.cmp(&y.0).then_with (|| x.1.cmp(&y.1)).then_with (|| x.2.cmp(&y.2));
312312 ///
313313 /// assert_eq!(result, Ordering::Less);
314314 /// ```
315315 #[ unstable( feature = "ordering_chaining" , issue = "37053" ) ]
316- pub fn or_else < F : FnOnce ( ) -> Ordering > ( self , f : F ) -> Ordering {
316+ pub fn then_with < F : FnOnce ( ) -> Ordering > ( self , f : F ) -> Ordering {
317317 match self {
318318 Equal => f ( ) ,
319319 _ => self ,
0 commit comments