We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3070f39 commit cf2b1c1Copy full SHA for cf2b1c1
src/libcore/ops/range.rs
@@ -404,6 +404,19 @@ impl<Idx> RangeInclusive<Idx> {
404
pub fn end(&self) -> &Idx {
405
&self.end
406
}
407
+
408
+ /// Destructures the RangeInclusive into (lower bound, upper (inclusive) bound).
409
+ ///
410
+ /// # Examples
411
412
+ /// ```
413
+ /// assert_eq!((3..=5).into_inner(), (3, 5));
414
415
+ #[stable(feature = "inclusive_range_methods", since = "1.27.0")]
416
+ #[inline]
417
+ pub fn into_inner(self) -> (Idx, Idx) {
418
+ (self.start, self.end)
419
+ }
420
421
422
#[stable(feature = "inclusive_range", since = "1.26.0")]
0 commit comments