Skip to content

Commit 43a0226

Browse files
committed
Fix doctests
1 parent ca76d43 commit 43a0226

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/libcore/cmp.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,8 +266,8 @@ impl Ordering {
266266
/// let result = Ordering::Equal.or(Ordering::Equal);
267267
/// assert_eq!(result, Ordering::Equal);
268268
///
269-
/// let x = (1, 2, 7);
270-
/// let y = (1, 5, 3);
269+
/// let x: (i64, i64, i64) = (1, 2, 7);
270+
/// let y: (i64, i64, i64) = (1, 5, 3);
271271
/// let result = x.0.cmp(y.0).or(x.1.cmp(y.1)).or(x.2.cmp(y.2));
272272
///
273273
/// assert_eq!(result, Ordering::Less);
@@ -302,8 +302,8 @@ impl Ordering {
302302
/// let result = Ordering::Equal.or_else(|| Ordering::Equal);
303303
/// assert_eq!(result, Ordering::Equal);
304304
///
305-
/// let x = (1, 2, 7);
306-
/// let y = (1, 5, 3);
305+
/// let x: (i64, i64, i64) = (1, 2, 7);
306+
/// let y: (i64, i64, i64) = (1, 5, 3);
307307
/// let result = x.0.cmp(&y.0).or_else(|| x.1.cmp(&y.1)).or_else(|| x.2.cmp(&y.2));
308308
///
309309
/// assert_eq!(result, Ordering::Less);

0 commit comments

Comments
 (0)