Use is_err rather than pattern matching.

This commit is contained in:
Paul Lietar 2016-04-24 09:54:56 +01:00
parent 8bbed4c162
commit f8cd09e5be

View file

@ -34,11 +34,9 @@ static APPKEY: Option<&'static [u8]> = Some(include_bytes!(concat!(env!("CARGO_M
static APPKEY: Option<&'static [u8]> = None; static APPKEY: Option<&'static [u8]> = None;
fn main() { fn main() {
let rust_log = "RUST_LOG"; if env::var("RUST_LOG").is_err() {
if let Err(_) = env::var(rust_log) { env::set_var("RUST_LOG", "debug")
env::set_var(rust_log, "debug")
} }
env_logger::init().unwrap(); env_logger::init().unwrap();
info!("librespot {} ({}). Built on {}.", info!("librespot {} ({}). Built on {}.",