MCPcopy Create free account
hub / github.com/fadeevab/design-patterns-rust / check

Method check

structural/facade/security_code.rs:10–17  ·  view source on GitHub ↗
(&self, code: u32)

Source from the content-addressed store, hash-verified

8 }
9
10 pub fn check(&self, code: u32) -> Result<(), String> {
11 if self.code != code {
12 return Err("Security code is incorrect".into());
13 }
14
15 println!("Security code verified");
16 Ok(())
17 }
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected