Browse Source

Merge pull request #410 from ogoffart/master

Implement Display for Error
urgh
Alex Crichton 5 years ago
committed by GitHub
parent
commit
4c4ea0eace
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      src/lib.rs

7
src/lib.rs

@ -64,6 +64,7 @@ extern crate rayon;
use std::collections::HashMap;
use std::env;
use std::ffi::{OsStr, OsString};
use std::fmt::{self, Display};
use std::fs;
use std::io::{self, BufRead, BufReader, Read, Write};
use std::path::{Path, PathBuf};
@ -162,6 +163,12 @@ impl From<io::Error> for Error {
}
}
impl Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{:?}: {}", self.kind, self.message)
}
}
/// Configuration used to represent an invocation of a C compiler.
///
/// This can be used to figure out what compiler is in use, what the arguments

Loading…
Cancel
Save