Skip to content

Commit f06a6a1

Browse files
authored
Merge pull request aya-rs#30 from vadorovsky/ci-libpolly
ci: Install libpolly-*-dev package
2 parents bb73c0b + 92884b8 commit f06a6a1

File tree

4 files changed

+5
-6
lines changed

4 files changed

+5
-6
lines changed

.github/workflows/build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
7474
echo -e "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main\n" | sudo tee /etc/apt/sources.list.d/llvm.list
7575
sudo apt-get update
76-
sudo apt-get install llvm-${{ matrix.llvm }}-dev libclang-${{ matrix.llvm }}-dev
76+
sudo apt-get install llvm-${{ matrix.llvm }}-dev libclang-${{ matrix.llvm }}-dev libpolly-${{ matrix.llvm }}-dev
7777
7878
- name: Install LLVM tools
7979
if: matrix.llvm == 'rustc'

src/bin/bpf-linker.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ fn main() {
182182
Ok(s) if !s.is_empty() => match s.parse::<LevelFilter>() {
183183
Ok(l) => Some(l),
184184
Err(e) => error(
185-
&format!("invalid RUST_LOG value: {}", e),
185+
&format!("invalid RUST_LOG value: {e}"),
186186
clap::error::ErrorKind::InvalidValue,
187187
),
188188
},
@@ -194,7 +194,7 @@ fn main() {
194194
Ok(f) => f,
195195
Err(e) => {
196196
error(
197-
&format!("failed to open log file: {:?}", e),
197+
&format!("failed to open log file: {e:?}"),
198198
clap::error::ErrorKind::Io,
199199
);
200200
}

src/linker.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ use std::{
1212
io,
1313
io::Read,
1414
io::Seek,
15-
io::SeekFrom,
1615
path::Path,
1716
path::PathBuf,
1817
ptr, str,
@@ -241,7 +240,7 @@ impl Linker {
241240
// or an invalid file
242241
file.read(&mut buf)
243242
.map_err(|e| LinkerError::IoError(path.clone(), e))?;
244-
file.seek(SeekFrom::Start(0))
243+
file.rewind()
245244
.map_err(|e| LinkerError::IoError(path.clone(), e))?;
246245
let in_type = detect_input_type(&buf)
247246
.ok_or_else(|| LinkerError::InvalidInputType(path.clone()))?;

src/llvm/message.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ impl fmt::Display for Message {
4242
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4343
if !self.is_empty() {
4444
let contents = unsafe { CStr::from_ptr(self.ptr).to_str().unwrap() };
45-
write!(f, "{}", contents)
45+
write!(f, "{contents}")
4646
} else {
4747
write!(f, "(empty)")
4848
}

0 commit comments

Comments
 (0)