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

Function init_root

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

Source from the content-addressed store, hash-verified

220 }
221
222 pub fn init_root() -> TestIdGuard {
223 static NEXT_ID: AtomicUsize = AtomicUsize::new(0);
224
225 let id = NEXT_ID.fetch_add(1, Ordering::SeqCst);
226 TEST_ID.with(|n| *n.borrow_mut() = Some(id));
227
228 let guard = TestIdGuard { _private: () };
229
230 set_global_root();
231 let r = root();
232 r.rm_rf();
233 r.mkdir_p();
234
235 guard
236 }
237
238 pub fn root() -> PathBuf {
239 let id = TEST_ID.with(|n| {

Calls 5

newFunction · 0.85
set_global_rootFunction · 0.85
rootFunction · 0.85
rm_rfMethod · 0.80
mkdir_pMethod · 0.80

Tested by

no test coverage detected