MCPcopy Create free account
hub / github.com/CleanCut/ultimate_rust2 / main

Function main

exercise/logging/src/main.rs:9–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7// 7. Update Cargo.toml to add the `env_logger` dependency
8
9fn main() {
10 // 8. Initialize env_logger using the init() function at the top level of the library
11
12 // 9. Run this program with `cargo run` and take a look at the default output.
13 // - Now run it again with an explicit log level, like `RUST_LOG=info cargo run`
14 // - or `RUST_LOG=trace cargo run`
15 let mut skippy = Frog::new();
16 skippy.hop();
17 skippy.hop();
18 skippy.hop();
19 skippy.hop();
20 skippy.hop();
21 skippy.sleep();
22 skippy.sleep();
23
24 // Challenge: Go back to lib.rs and set the `target: ` argument for each logging call to be the
25 // path to the function. For example, `Frog::new`
26}

Callers

nothing calls this directly

Calls 2

hopMethod · 0.80
sleepMethod · 0.80

Tested by

no test coverage detected