#[test]
fn one(){
let result = some_res_hungry_fn();
assert.....
}
#[test]
fn two(){
let result = some_res_hungry_fn();
assert.....
}
In this test, Is it possible to reuse this some_res_hungry_fn?
Yes, why not, consumes nothing, so not tied to any refrence variables.
I meant how do we do that?
fn do_something(){ std::thread::sleep(50); 5}
Обсуждают сегодня