Skip to content

Commit 2779c18

Browse files
committed
Switch from std::env::set_exit_status() to std::process::exit()
1 parent c0c6748 commit 2779c18

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

examples/roundtrip.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
// This project is MIT licensed.
55
// Please see the COPYING file for more information.
66

7-
// These are unstable for now
8-
#![feature(exit_status)]
9-
107
extern crate xml;
118
use std::fs::File;
129
use std::io::Read;
@@ -25,8 +22,7 @@ fn main() {
2522
Ok(file) => file,
2623
Err(err) => {
2724
println!("Couldn't open file: {}", err);
28-
std::env::set_exit_status(1);
29-
return;
25+
std::process::exit(1);
3026
}
3127
};
3228

@@ -36,8 +32,7 @@ fn main() {
3632
let mut string = String::new();
3733
if let Err(err) = rdr.read_to_string(&mut string) {
3834
println!("Reading failed: {}", err);
39-
std::env::set_exit_status(1);
40-
return;
35+
std::process::exit(1);
4136
};
4237

4338
p.feed_str(&string);

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#![forbid(non_camel_case_types)]
1010
#![warn(missing_docs)]
1111

12-
// These are unstable for now
12+
// Required for benchmarks
1313
#![cfg_attr(test, feature(test))]
1414

1515
/*!

0 commit comments

Comments
 (0)