Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit aa2c77d

Browse files
Daniel Dulaneymeh
Daniel Dulaney
authored andcommitted
build: upgrade build deps and fix try! warnings
- upgrade num_cpus from 1.0 to 1.11 - upgrade regex from 0.2 to 1.3 - replace 3 instances of try! with ? in build.rs
1 parent 716cc64 commit aa2c77d

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ keywords = ["audio", "video"]
1515
libc = "0.2"
1616

1717
[build-dependencies]
18-
num_cpus = "1.0"
19-
cc = "1.0"
18+
num_cpus = "1.11"
19+
cc = "1.0"
2020
pkg-config = "0.3"
2121
bindgen = "0.51.1"
22-
regex = "0.2"
22+
regex = "1.3"
2323

2424
[features]
2525
default = ["avcodec", "avdevice", "avfilter", "avformat", "swresample", "swscale"]

build.rs

+8-12
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,14 @@ fn search() -> PathBuf {
117117
}
118118

119119
fn fetch() -> io::Result<()> {
120-
let status = try!(
121-
Command::new("git")
120+
let status = Command::new("git")
122121
.current_dir(&output())
123122
.arg("clone")
124123
.arg("-b")
125124
.arg(format!("release/{}", version()))
126125
.arg("https://github.com/FFmpeg/FFmpeg")
127126
.arg(format!("ffmpeg-{}", version()))
128-
.status()
129-
);
127+
.status()?;
130128

131129
if status.success() {
132130
Ok(())
@@ -281,24 +279,22 @@ fn build() -> io::Result<()> {
281279
}
282280

283281
// run make
284-
if !try!(
285-
Command::new("make")
282+
if !Command::new("make")
286283
.arg("-j")
287284
.arg(num_cpus::get().to_string())
288285
.current_dir(&source())
289-
.status()
290-
).success()
286+
.status()?
287+
.success()
291288
{
292289
return Err(io::Error::new(io::ErrorKind::Other, "make failed"));
293290
}
294291

295292
// run make install
296-
if !try!(
297-
Command::new("make")
293+
if !Command::new("make")
298294
.current_dir(&source())
299295
.arg("install")
300-
.status()
301-
).success()
296+
.status()?
297+
.success()
302298
{
303299
return Err(io::Error::new(io::ErrorKind::Other, "make install failed"));
304300
}

0 commit comments

Comments
 (0)