@@ -21,7 +21,7 @@ use str;
21
21
use str:: { CharSplitIterator , OwnedStr , Str , StrVector } ;
22
22
use to_bytes:: IterBytes ;
23
23
use vec:: Vector ;
24
- use super :: { BytesContainer , GenericPath , GenericPathUnsafe } ;
24
+ use super :: { contains_nul , BytesContainer , GenericPath , GenericPathUnsafe } ;
25
25
26
26
#[ cfg( target_os = "win32" ) ]
27
27
use libc;
@@ -922,9 +922,8 @@ pub enum PathPrefix {
922
922
DiskPrefix
923
923
}
924
924
925
- /// Internal function; only public for tests. Don't use.
926
925
// FIXME (#8169): Make private once visibility is fixed
927
- pub fn parse_prefix < ' a > ( mut path : & ' a str ) -> Option < PathPrefix > {
926
+ fn parse_prefix < ' a > ( mut path : & ' a str ) -> Option < PathPrefix > {
928
927
if path. starts_with ( "\\ \\ " ) {
929
928
// \\
930
929
path = path. slice_from ( 2 ) ;
@@ -1032,12 +1031,6 @@ fn normalize_helper<'a>(s: &'a str, prefix: Option<PathPrefix>) -> (bool,Option<
1032
1031
}
1033
1032
}
1034
1033
1035
- // FIXME (#8169): Pull this into parent module once visibility works
1036
- #[ inline( always) ]
1037
- fn contains_nul ( v : & [ u8 ] ) -> bool {
1038
- v. iter ( ) . any ( |& x| x == 0 )
1039
- }
1040
-
1041
1034
fn prefix_is_verbatim ( p : Option < PathPrefix > ) -> bool {
1042
1035
match p {
1043
1036
Some ( VerbatimPrefix ( _) ) | Some ( VerbatimUNCPrefix ( _, _) ) | Some ( VerbatimDiskPrefix ) => true ,
@@ -1136,6 +1129,7 @@ impl Path {
1136
1129
#[ cfg( test) ]
1137
1130
mod tests {
1138
1131
use super :: * ;
1132
+ use super :: parse_prefix;
1139
1133
use option:: { Some , None } ;
1140
1134
use iter:: Iterator ;
1141
1135
use vec:: Vector ;
0 commit comments