October 2019
Intermediate to advanced
444 pages
10h 37m
English
By following these next few steps, you will be able to use macros:
macro_rules! strange_patterns { (The pattern must match precisely) => { "Text" }; (42) => { "Numeric" }; (;<=,<=;) => { "Alpha" };}
#[test] fn test_strange_patterns() { assert_eq!(strange_patterns!(The pattern must match precisely), "Text"); assert_eq!(strange_patterns!(42), "Numeric"); assert_eq!(strange_patterns!(;<=,<=;), ...Read now
Unlock full access