Skip to content

Commit a254783

Browse files
committed
Fix GitHub Actions
1 parent 2a6fcb6 commit a254783

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

.github/workflows/checks.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jobs:
99
steps:
1010
- name: Pull source
1111
uses: actions/checkout@v2
12+
- run: sudo apt -y install pkg-config libssl-dev liblzma-dev
1213
- name: Run cargo test
1314
run: cargo test
1415
env:
@@ -30,6 +31,7 @@ jobs:
3031
steps:
3132
- name: Pull source
3233
uses: actions/checkout@v2
34+
- run: sudo apt -y install pkg-config libssl-dev liblzma-dev
3335
- name: Run cargo clippy
3436
run: cargo clippy
3537
env:

src/elf/detect.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use std::io::BufReader;
12
use std::io::Read;
23
use std::path::Path;
34

@@ -15,8 +16,7 @@ pub type Result<T> = std::result::Result<T, Error>;
1516

1617
/// Is the binary at `path` an ELF?
1718
pub fn is_elf(path: &Path) -> Result<bool> {
18-
Ok(File::open(path)
19-
.context(OpenSnafu)?
19+
Ok(BufReader::new(File::open(path).context(OpenSnafu)?)
2020
.bytes()
2121
.take(4)
2222
.collect::<std::io::Result<Vec<u8>>>()

0 commit comments

Comments
 (0)