Skip to content

Commit

Permalink
Merge pull request aya-rs#30 from vadorovsky/ci-libpolly
Browse files Browse the repository at this point in the history
ci: Install libpolly-*-dev package
  • Loading branch information
vadorovsky authored Jan 29, 2023
2 parents bb73c0b + 92884b8 commit f06a6a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
echo -e "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main\n" | sudo tee /etc/apt/sources.list.d/llvm.list
sudo apt-get update
sudo apt-get install llvm-${{ matrix.llvm }}-dev libclang-${{ matrix.llvm }}-dev
sudo apt-get install llvm-${{ matrix.llvm }}-dev libclang-${{ matrix.llvm }}-dev libpolly-${{ matrix.llvm }}-dev
- name: Install LLVM tools
if: matrix.llvm == 'rustc'
Expand Down
4 changes: 2 additions & 2 deletions src/bin/bpf-linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ fn main() {
Ok(s) if !s.is_empty() => match s.parse::<LevelFilter>() {
Ok(l) => Some(l),
Err(e) => error(
&format!("invalid RUST_LOG value: {}", e),
&format!("invalid RUST_LOG value: {e}"),
clap::error::ErrorKind::InvalidValue,
),
},
Expand All @@ -194,7 +194,7 @@ fn main() {
Ok(f) => f,
Err(e) => {
error(
&format!("failed to open log file: {:?}", e),
&format!("failed to open log file: {e:?}"),
clap::error::ErrorKind::Io,
);
}
Expand Down
3 changes: 1 addition & 2 deletions src/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use std::{
io,
io::Read,
io::Seek,
io::SeekFrom,
path::Path,
path::PathBuf,
ptr, str,
Expand Down Expand Up @@ -241,7 +240,7 @@ impl Linker {
// or an invalid file
file.read(&mut buf)
.map_err(|e| LinkerError::IoError(path.clone(), e))?;
file.seek(SeekFrom::Start(0))
file.rewind()
.map_err(|e| LinkerError::IoError(path.clone(), e))?;
let in_type = detect_input_type(&buf)
.ok_or_else(|| LinkerError::InvalidInputType(path.clone()))?;
Expand Down
2 changes: 1 addition & 1 deletion src/llvm/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl fmt::Display for Message {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
if !self.is_empty() {
let contents = unsafe { CStr::from_ptr(self.ptr).to_str().unwrap() };
write!(f, "{}", contents)
write!(f, "{contents}")
} else {
write!(f, "(empty)")
}
Expand Down

0 comments on commit f06a6a1

Please sign in to comment.