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

Method new

ch_06/src/store.rs:17–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

15
16impl Store {
17 pub fn new() -> Self {
18 Store {
19 questions: Arc::new(RwLock::new(Self::init())),
20 answers: Arc::new(RwLock::new(HashMap::new())),
21 }
22 }
23
24 fn init() -> HashMap<QuestionId, Question> {
25 let file = include_str!("../questions.json");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected