From b3951ae9d1019f936540c2bd41a3fa83d4b0f69b Mon Sep 17 00:00:00 2001 From: Marcin Mielniczuk Date: Tue, 1 Aug 2017 15:51:11 +0200 Subject: [PATCH] Remove a dead trait InjectLib. The Rust compiler didn't warn about it: rust-lang/rust#41883 --- src/main.rs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/src/main.rs b/src/main.rs index cf0647e..570890f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -9,24 +9,6 @@ use randmockery::syscall_override::{getrandom, time}; use std::process::Command; -trait InjectLib { - fn inject_lib(&mut self, &str); -} - -impl InjectLib for Command { - fn inject_lib(&mut self, lib: &str) { - use std::os::unix::process::CommandExt; - let lib_s = String::from(lib); - self.before_exec(move || { - println!("Loading library {}", lib_s); - match libloading::Library::new(&lib_s) { - Err(err) => panic!("Error loading library: {}", err), - Ok(_) => Ok(()), - } - }); - } -} - fn main() { let matches = args::get_parser().get_matches();