@@ -200,7 +200,7 @@ impl<V: Ord> Range<V> {
200
200
. segments
201
201
. last ( )
202
202
. expect ( "if there is a first element, there must be a last element" ) ;
203
- ( bound_as_ref ( start) , bound_as_ref ( & end. 1 ) )
203
+ ( start. as_ref ( ) , end. 1 . as_ref ( ) )
204
204
} )
205
205
}
206
206
@@ -303,15 +303,6 @@ fn within_bounds<V: PartialOrd>(v: &V, segment: &Interval<V>) -> Ordering {
303
303
Ordering :: Greater
304
304
}
305
305
306
- /// Implementation of [`Bound::as_ref`] which is currently marked as unstable.
307
- fn bound_as_ref < V > ( bound : & Bound < V > ) -> Bound < & V > {
308
- match bound {
309
- Included ( v) => Included ( v) ,
310
- Excluded ( v) => Excluded ( v) ,
311
- Unbounded => Unbounded ,
312
- }
313
- }
314
-
315
306
fn valid_segment < T : PartialOrd > ( start : & Bound < T > , end : & Bound < T > ) -> bool {
316
307
match ( start, end) {
317
308
( Included ( s) , Included ( e) ) => s <= e,
@@ -518,7 +509,7 @@ impl<V: Display + Eq> Display for Range<V> {
518
509
} else {
519
510
for ( idx, segment) in self . segments . iter ( ) . enumerate ( ) {
520
511
if idx > 0 {
521
- write ! ( f, ", " ) ?;
512
+ write ! ( f, " | " ) ?;
522
513
}
523
514
match segment {
524
515
( Unbounded , Unbounded ) => write ! ( f, "*" ) ?,
@@ -529,7 +520,7 @@ impl<V: Display + Eq> Display for Range<V> {
529
520
if v == b {
530
521
write ! ( f, "=={v}" ) ?
531
522
} else {
532
- write ! ( f, ">={v},<={b}" ) ?
523
+ write ! ( f, ">={v}, <={b}" ) ?
533
524
}
534
525
}
535
526
( Included ( v) , Excluded ( b) ) => write ! ( f, ">={v}, <{b}" ) ?,
0 commit comments