diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 39725e84..7d18f7a2 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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' diff --git a/src/bin/bpf-linker.rs b/src/bin/bpf-linker.rs index e9339565..acfccb2e 100644 --- a/src/bin/bpf-linker.rs +++ b/src/bin/bpf-linker.rs @@ -182,7 +182,7 @@ fn main() { Ok(s) if !s.is_empty() => match s.parse::() { Ok(l) => Some(l), Err(e) => error( - &format!("invalid RUST_LOG value: {}", e), + &format!("invalid RUST_LOG value: {e}"), clap::error::ErrorKind::InvalidValue, ), }, @@ -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, ); } diff --git a/src/linker.rs b/src/linker.rs index efaccb6f..d5d11071 100644 --- a/src/linker.rs +++ b/src/linker.rs @@ -12,7 +12,6 @@ use std::{ io, io::Read, io::Seek, - io::SeekFrom, path::Path, path::PathBuf, ptr, str, @@ -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()))?; diff --git a/src/llvm/message.rs b/src/llvm/message.rs index 662dea66..21971aa8 100644 --- a/src/llvm/message.rs +++ b/src/llvm/message.rs @@ -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)") }