Skip to content

Commit b3951ae

Browse files
committed
Remove a dead trait InjectLib.
The Rust compiler didn't warn about it: rust-lang/rust#41883
1 parent eb71206 commit b3951ae

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

src/main.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,6 @@ use randmockery::syscall_override::{getrandom, time};
99

1010
use std::process::Command;
1111

12-
trait InjectLib {
13-
fn inject_lib(&mut self, &str);
14-
}
15-
16-
impl InjectLib for Command {
17-
fn inject_lib(&mut self, lib: &str) {
18-
use std::os::unix::process::CommandExt;
19-
let lib_s = String::from(lib);
20-
self.before_exec(move || {
21-
println!("Loading library {}", lib_s);
22-
match libloading::Library::new(&lib_s) {
23-
Err(err) => panic!("Error loading library: {}", err),
24-
Ok(_) => Ok(()),
25-
}
26-
});
27-
}
28-
}
29-
3012
fn main() {
3113
let matches = args::get_parser().get_matches();
3214

0 commit comments

Comments
 (0)