diff options
author | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2016-01-11 22:19:22 +0100 |
---|---|---|
committer | pierresy <pierre-henri.symoneaux@alcatel-lucent.com> | 2016-01-11 22:20:06 +0100 |
commit | 2360c7b4cd53c7bdfd8cdd630db7c4393d828399 (patch) | |
tree | dcdeaf8dabccf2f85fa536f5e43a1aa0916db136 /src/lib.rs | |
parent | 74f15acde6f32f85a06aeddd4e49dbaf5bb20af3 (diff) |
Fixed windows issue for pull request #16
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -142,10 +142,13 @@ impl <'a> TableSlice<'a> { /// # Panic
/// Panic if writing to standard output fails
pub fn printstd(&self) {
- match stdout() {
+ let r = match stdout() {
Some(mut o) => self.print_term(&mut *o),
None => self.print(&mut io::stdout()),
- }.ok().expect("Cannot print table to standard output");
+ };
+ if let Err(e) = r {
+ panic!("Cannot print table to standard output : {}", e);
+ }
}
}
|