Modules Use Example
use std::f64::consts::PI
allows us to just use the identifierPI
in my main function
use std::f64::consts::PI; fn main() { println!("Welcome to the playground!"); println!("I would love a slice of {}!", PI); }
- Multiple items can be referenced in a single module path as so
use std::f64::consts::{PI,TAU}