Created
June 3, 2016 18:27
-
-
Save sck/fd66c29430c8fd1558840152727b2a1f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn describe<F: FnOnce()>(message: &str, func: F) { | |
println!("{}", message); | |
func(); | |
} | |
fn it<F: FnOnce()>(message: &str, func: F) { | |
println!(" - {}", message); | |
func(); | |
} | |
fn main() { | |
describe("An array", || { | |
it("Should be empty", || { | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment