MCPcopy Index your code
hub / github.com/clearloop/leetcode-cli / new

Method new

src/cache/mod.rs:392–399  ·  view source on GitHub ↗

New cache

()

Source from the content-addressed store, hash-verified

390
391 /// New cache
392 pub fn new() -> Result<Self, Error> {
393 let conf = Config::locate()?;
394 let mut c = conn(conf.storage.cache()?);
395 diesel::sql_query(CREATE_PROBLEMS_IF_NOT_EXISTS).execute(&mut c)?;
396 diesel::sql_query(CREATE_TAGS_IF_NOT_EXISTS).execute(&mut c)?;
397
398 Ok(Cache(LeetCode::new()?))
399 }
400}

Callers

nothing calls this directly

Calls 3

connFunction · 0.85
CacheClass · 0.85
cacheMethod · 0.80

Tested by

no test coverage detected