Skip to content

knox-networks/rust-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Workshop Pages: https://knox-networks.github.io/rust-workshop/

Resources

Debugging Quickref:

  • dbg!() macro for more accurate println!
let a = 2;
let b = dbg!(a * 2) + 1;
//      ^-- prints: [src/main.rs:2] a * 2 = 4
assert_eq!(b, 5);
$ cargo test -- --nocapture
#[test]
fn test() {
    println!("If `cargo test --` gets the `--nocapture` flag, \
              then I will print to stdout");
}