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.
into_inner(self) -> (Idx, Idx)
1 parent 8ff4b42 commit 23aa483Copy full SHA for 23aa483
src/libcore/ops/range.rs
@@ -411,6 +411,21 @@ impl<Idx> RangeInclusive<Idx> {
411
pub fn end(&self) -> &Idx {
412
&self.end
413
}
414
+
415
+ /// Destructures the RangeInclusive into (lower bound, upper (inclusive) bound).
416
+ ///
417
+ /// # Examples
418
419
+ /// ```
420
+ /// #![feature(inclusive_range_methods)]
421
422
+ /// assert_eq!((3..=5).into_inner(), (3, 5));
423
424
+ #[unstable(feature = "inclusive_range_methods", issue = "49022")]
425
+ #[inline]
426
+ pub fn into_inner(self) -> (Idx, Idx) {
427
+ (self.start, self.end)
428
+ }
429
430
431
#[stable(feature = "inclusive_range", since = "1.26.0")]
0 commit comments