about summary refs log tree commit diff
path: root/src/libregex
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-11-26 09:44:30 -0800
committerAlex Crichton <alex@alexcrichton.com>2014-11-26 16:49:36 -0800
commit34b98b306ad23ab895f701de1d009ff026a1d2b1 (patch)
tree444a666722fa16d289f0ef1fa9f5f13e2205baed /src/libregex
parent60299d75e2ad7e4de6482bfc50f7b5f471c1f55c (diff)
parent36372b929e9d44c7421827b160505854ceeb9a83 (diff)
downloadrust-34b98b306ad23ab895f701de1d009ff026a1d2b1.tar.gz
rust-34b98b306ad23ab895f701de1d009ff026a1d2b1.zip
rollup merge of #19287: alexcrichton/issue-19272
At the same time remove the `pub use` of the variants in favor of accessing
through the enum type itself. This is a breaking change as the `Found` and
`NotFound` variants must now be imported through `BinarySearchResult` instead of
just `std::slice`.

[breaking-change]
Closes #19271
Diffstat (limited to 'src/libregex')
-rw-r--r--src/libregex/parse.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libregex/parse.rs b/src/libregex/parse.rs
index c6f09e46971..2bf3fa992cd 100644
--- a/src/libregex/parse.rs
+++ b/src/libregex/parse.rs
@@ -18,7 +18,7 @@ use std::cmp;
 use std::fmt;
 use std::iter;
 use std::num;
-use std::slice;
+use std::slice::BinarySearchResult;
 
 /// Static data containing Unicode ranges for general categories and scripts.
 use unicode::regex::{UNICODE_CLASSES, PERLD, PERLS, PERLW};
@@ -1027,8 +1027,8 @@ fn is_valid_cap(c: char) -> bool {
 
 fn find_class(classes: NamedClasses, name: &str) -> Option<Vec<(char, char)>> {
     match classes.binary_search(|&(s, _)| s.cmp(name)) {
-        slice::Found(i) => Some(classes[i].val1().to_vec()),
-        slice::NotFound(_) => None,
+        BinarySearchResult::Found(i) => Some(classes[i].val1().to_vec()),
+        BinarySearchResult::NotFound(_) => None,
     }
 }