Skip to content

Commit 0666b64

Browse files
committed
edition 2021, cargo fmt
1 parent c8b5a03 commit 0666b64

File tree

5 files changed

+15
-17
lines changed

5 files changed

+15
-17
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ keywords = ["BPF", "eBPF", "linker", "llvm"]
88
categories = ["development-tools", "command-line-utilities", "no-std", "os::linux-apis"]
99
repository = "https://github.com/aya-rs/bpf-linker"
1010
readme = "README.md"
11-
edition = "2018"
11+
edition = "2021"
1212

1313
[dependencies]
1414
# cli deps

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#![deny(clippy::all)]
22

3-
mod llvm;
43
mod linker;
4+
mod llvm;
55

66
pub use linker::*;

src/llvm/iter.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,4 @@ llvm_iterator!(
6767
LLVMValueRef,
6868
LLVMGetFirstGlobalAlias,
6969
LLVMGetNextGlobalAlias
70-
);
70+
);

src/llvm/mod.rs

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -305,18 +305,16 @@ pub unsafe fn internalize(value: LLVMValueRef, name: &str, export_symbols: &Hash
305305
}
306306

307307
pub extern "C" fn diagnostic_handler(info: LLVMDiagnosticInfoRef, _data: *mut c_void) {
308-
309-
let message = unsafe { CStr::from_ptr(LLVMGetDiagInfoDescription(info)) };
310-
let message_s = message.to_str().unwrap();
311-
312-
use llvm_sys::LLVMDiagnosticSeverity::*;
313-
match unsafe { LLVMGetDiagInfoSeverity(info) }{
314-
LLVMDSError => error!("llvm: {}", message_s),
315-
LLVMDSWarning => warn!("llvm: {}", message_s),
316-
LLVMDSRemark => debug!("remark: {}", message_s),
317-
LLVMDSNote => debug!("note: {}", message_s),
318-
};
319-
308+
let message = unsafe { CStr::from_ptr(LLVMGetDiagInfoDescription(info)) };
309+
let message_s = message.to_str().unwrap();
310+
311+
use llvm_sys::LLVMDiagnosticSeverity::*;
312+
match unsafe { LLVMGetDiagInfoSeverity(info) } {
313+
LLVMDSError => error!("llvm: {}", message_s),
314+
LLVMDSWarning => warn!("llvm: {}", message_s),
315+
LLVMDSRemark => debug!("remark: {}", message_s),
316+
LLVMDSNote => debug!("note: {}", message_s),
317+
};
320318
}
321319

322320
pub extern "C" fn fatal_error(reason: *const c_char) {

tests/tests.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
extern crate compiletest_rs as compiletest;
22

3-
use which::which;
43
use std::{env, path::PathBuf};
4+
use which::which;
55

66
fn run_mode(mode: &'static str) {
77
let mut config = compiletest::Config::default();
@@ -27,7 +27,7 @@ fn run_mode(mode: &'static str) {
2727
config.mode = mode.parse().expect("Invalid mode");
2828
config.src_base = PathBuf::from(format!("tests/{}", mode));
2929
config.link_deps(); // Populate config.target_rustcflags with dependencies on the path
30-
//config.clean_rmeta(); // If your tests import the parent crate, this helps with E0464
30+
//config.clean_rmeta(); // If your tests import the parent crate, this helps with E0464
3131

3232
compiletest::run_tests(&config);
3333
}

0 commit comments

Comments
 (0)