MCPcopy Create free account
hub / github.com/Rust-Web-Development/code / new

Method new

ch_04/final/src/main.rs:53–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52impl Store {
53 fn new() -> Self {
54 Store {
55 questions: Arc::new(RwLock::new(Self::init())),
56 answers: Arc::new(RwLock::new(HashMap::new())),
57 }
58 }
59
60 fn init() -> HashMap<QuestionId, Question> {
61 let file = include_str!("../questions.json");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected