Skip to content

Commit db2a8e8

Browse files
committed
Fix clippy errors
Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
1 parent 28d1494 commit db2a8e8

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/bin/bpf-linker.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ struct CommandLine {
135135
#[clap(long, value_name = "symbols", use_delimiter = true, multiple = true)]
136136
export: Vec<String>,
137137

138-
#[clap(short = 'l', long = "lib", use_delimiter = true, multiple = true, hidden = true)]
138+
#[clap(
139+
short = 'l',
140+
long = "lib",
141+
use_delimiter = true,
142+
multiple = true,
143+
hidden = true
144+
)]
139145
_lib: Option<String>,
140146
#[clap(long = "debug", hidden = true)]
141147
_debug: bool,

src/linker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ impl Linker {
437437
fn write_ir(&mut self, output: &CStr) -> Result<(), LinkerError> {
438438
info!("writing IR to {:?}", output);
439439

440-
unsafe { llvm::write_ir(self.module, &output) }.map_err(LinkerError::WriteIRError)
440+
unsafe { llvm::write_ir(self.module, output) }.map_err(LinkerError::WriteIRError)
441441
}
442442

443443
fn emit(&mut self, output: &CStr, output_type: LLVMCodeGenFileType) -> Result<(), LinkerError> {

src/llvm/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub unsafe fn init<T: AsRef<str>>(args: &[T], overview: &str) {
3535
LLVMInitializeBPFAsmPrinter();
3636
LLVMInitializeBPFDisassembler();
3737

38-
parse_command_line_options(&args, overview);
38+
parse_command_line_options(args, overview);
3939
}
4040

4141
unsafe fn parse_command_line_options<T: AsRef<str>>(args: &[T], overview: &str) {
@@ -138,7 +138,7 @@ pub unsafe fn target_from_triple(triple: &CStr) -> Result<LLVMTargetRef, String>
138138

139139
pub unsafe fn target_from_module(module: LLVMModuleRef) -> Result<LLVMTargetRef, String> {
140140
let triple = LLVMGetTarget(module);
141-
target_from_triple(&CStr::from_ptr(triple))
141+
target_from_triple(CStr::from_ptr(triple))
142142
}
143143

144144
pub unsafe fn create_target_machine(

0 commit comments

Comments
 (0)