diff --git a/sys/Cargo.toml b/sys/Cargo.toml index f24541e..5d3f81c 100644 --- a/sys/Cargo.toml +++ b/sys/Cargo.toml @@ -15,11 +15,11 @@ keywords = ["audio", "video"] libc = "0.2" [build-dependencies] -num_cpus = "1.0" -cc = "1.0" +num_cpus = "1.11" +cc = "1.0" pkg-config = "0.3" bindgen = "0.51.1" -regex = "0.2" +regex = "1.3" [features] default = ["avcodec", "avdevice", "avfilter", "avformat", "swresample", "swscale"] diff --git a/sys/build.rs b/sys/build.rs index 2b1282c..9d2fafa 100644 --- a/sys/build.rs +++ b/sys/build.rs @@ -117,16 +117,14 @@ fn search() -> PathBuf { } fn fetch() -> io::Result<()> { - let status = try!( - Command::new("git") + let status = Command::new("git") .current_dir(&output()) .arg("clone") .arg("-b") .arg(format!("release/{}", version())) .arg("https://github.com/FFmpeg/FFmpeg") .arg(format!("ffmpeg-{}", version())) - .status() - ); + .status()?; if status.success() { Ok(()) @@ -281,24 +279,22 @@ fn build() -> io::Result<()> { } // run make - if !try!( - Command::new("make") + if !Command::new("make") .arg("-j") .arg(num_cpus::get().to_string()) .current_dir(&source()) - .status() - ).success() + .status()? + .success() { return Err(io::Error::new(io::ErrorKind::Other, "make failed")); } // run make install - if !try!( - Command::new("make") + if !Command::new("make") .current_dir(&source()) .arg("install") - .status() - ).success() + .status()? + .success() { return Err(io::Error::new(io::ErrorKind::Other, "make install failed")); }