We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb71206 commit b3951aeCopy full SHA for b3951ae
src/main.rs
@@ -9,24 +9,6 @@ use randmockery::syscall_override::{getrandom, time};
9
10
use std::process::Command;
11
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
30
fn main() {
31
let matches = args::get_parser().get_matches();
32
0 commit comments