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

Method new

exercise/logging/src/lib.rs:16–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15impl Frog {
16 pub fn new() -> Self {
17 // 2. Use debug!() to log "A new Frog has been created"
18 Default::default()
19 }
20 pub fn hop(&mut self) {
21 self.energy -= 1;
22 // 3. Use info!() to log that a Frog hopped, and how much energy is left

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected