Skip to content

Commit 52974bd

Browse files
committed
glob: Switch field privacy as necessary
1 parent 89fa141 commit 52974bd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

src/libglob/lib.rs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ use std::path::is_sep;
4141
* pattern - see the `glob` function for more details.
4242
*/
4343
pub struct Paths {
44-
priv root: Path,
45-
priv dir_patterns: Vec<Pattern> ,
46-
priv options: MatchOptions,
47-
priv todo: Vec<(Path,uint)> }
44+
root: Path,
45+
dir_patterns: Vec<Pattern>,
46+
options: MatchOptions,
47+
todo: Vec<(Path,uint)>,
48+
}
4849

4950
///
5051
/// Return an iterator that produces all the Paths that match the given pattern,
@@ -176,7 +177,8 @@ fn list_dir_sorted(path: &Path) -> Vec<Path> {
176177
*/
177178
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, Hash, Default)]
178179
pub struct Pattern {
179-
priv tokens: Vec<PatternToken> }
180+
tokens: Vec<PatternToken>,
181+
}
180182

181183
#[deriving(Clone, Eq, TotalEq, Ord, TotalOrd, Hash)]
182184
enum PatternToken {
@@ -513,21 +515,21 @@ pub struct MatchOptions {
513515
* currently only considers upper/lower case relationships between ASCII characters,
514516
* but in future this might be extended to work with Unicode.
515517
*/
516-
priv case_sensitive: bool,
518+
case_sensitive: bool,
517519

518520
/**
519521
* If this is true then path-component separator characters (e.g. `/` on Posix)
520522
* must be matched by a literal `/`, rather than by `*` or `?` or `[...]`
521523
*/
522-
priv require_literal_separator: bool,
524+
require_literal_separator: bool,
523525

524526
/**
525527
* If this is true then paths that contain components that start with a `.` will
526528
* not match unless the `.` appears literally in the pattern: `*`, `?` or `[...]`
527529
* will not match. This is useful because such files are conventionally considered
528530
* hidden on Unix systems and it might be desirable to skip them when listing files.
529531
*/
530-
priv require_literal_leading_dot: bool
532+
require_literal_leading_dot: bool
531533
}
532534

533535
impl MatchOptions {

0 commit comments

Comments
 (0)