Skip to content

Commit d6db537

Browse files
authored
Merge branch 'master' into fix_build
2 parents 1d346a0 + 8b38a64 commit d6db537

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/lib.rs

+7-6
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub fn test_opts(config: &Config) -> test::TestOpts {
126126
skip: vec![],
127127
list: false,
128128
options: test::Options::new(),
129+
#[cfg(not(feature = "stable"))]
129130
time_options: None,
130131
}
131132
}
@@ -151,8 +152,8 @@ fn collect_tests_from_dir(config: &Config,
151152
-> io::Result<()> {
152153
// Ignore directories that contain a file
153154
// `compiletest-ignore-dir`.
154-
for file in try!(fs::read_dir(dir)) {
155-
let file = try!(file);
155+
for file in fs::read_dir(dir)? {
156+
let file = file?;
156157
let name = file.file_name();
157158
if name == *"compiletest-ignore-dir" {
158159
return Ok(());
@@ -179,9 +180,9 @@ fn collect_tests_from_dir(config: &Config,
179180

180181
// Add each `.rs` file as a test, and recurse further on any
181182
// subdirectories we find, except for `aux` directories.
182-
let dirs = try!(fs::read_dir(dir));
183+
let dirs = fs::read_dir(dir)?;
183184
for file in dirs {
184-
let file = try!(file);
185+
let file = file?;
185186
let file_path = file.path();
186187
let file_name = file.file_name();
187188
if is_test(&file_name) {
@@ -212,11 +213,11 @@ fn collect_tests_from_dir(config: &Config,
212213
fs::create_dir_all(&build_dir).unwrap();
213214
} else {
214215
debug!("found directory: {:?}", file_path.display());
215-
try!(collect_tests_from_dir(config,
216+
collect_tests_from_dir(config,
216217
base,
217218
&file_path,
218219
&relative_file_path,
219-
tests));
220+
tests)?;
220221
}
221222
} else {
222223
debug!("found other file/directory: {:?}", file_path.display());

0 commit comments

Comments
 (0)