Skip to content

Instantly share code, notes, and snippets.

fn stub(function: fn(&[&str])) -> &str {
let original_function = function;
function = |arg: &[&str]| {
println("I'm in my stub wrapper");
original_function(arg);
}
}