MCPcopy Create free account
hub / github.com/Apress/beginning-rust-2e / new

Method new

Source Code/18-10.rs:9–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7 }
8 impl Person {
9 fn new() -> Self {
10 Self {
11 personal_names: String::new(),
12 family_names: String::new(),
13 }
14 }
15 fn naming(&self) -> String {
16 format!("{} {}",
17 self.personal_names,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected