MCPcopy Index your code
hub / github.com/cargo-lambda/cargo-lambda / root

Function root

crates/cargo-lambda-cli/tests/harness/project.rs:238–247  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

236 }
237
238 pub fn root() -> PathBuf {
239 let id = TEST_ID.with(|n| {
240 n.borrow()
241 .expect("Tests must call `init_root` to use the crate root.")
242 });
243
244 let mut root = global_root();
245 root.push(format!("t{}-{}", std::process::id(), id));
246 root
247 }
248
249 fn set_global_root() {
250 let mut lock = GLOBAL_ROOT.get_or_init(Default::default).lock().unwrap();

Callers 4

from_templateMethod · 0.85
projectFunction · 0.85
init_rootFunction · 0.85
assert_uiFunction · 0.85

Calls 2

global_rootFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected