MCPcopy Create free account
hub / github.com/ExtropyIO/SolanaBootcamp / run

Function run

homeworks_rust/src/run.rs:9–16  ·  view source on GitHub ↗

Invoke the rust compiler on the path of the given exercise, and run the ensuing binary. The verbose argument helps determine whether or not to show the output from the test harnesses (if the mode of the exercise is test)

(exercise: &Exercise, verbose: bool)

Source from the content-addressed store, hash-verified

7// The verbose argument helps determine whether or not to show
8// the output from the test harnesses (if the mode of the exercise is test)
9pub fn run(exercise: &Exercise, verbose: bool) -> Result<(), ()> {
10 match exercise.mode {
11 Mode::Test => test(exercise, verbose)?,
12 Mode::Compile => compile_and_run(exercise)?,
13 Mode::Clippy => compile_and_run(exercise)?,
14 }
15 Ok(())
16}
17
18// Invoke the rust compiler on the path of the given exercise
19// and run the ensuing binary.

Callers 1

mainFunction · 0.85

Calls 2

testFunction · 0.85
compile_and_runFunction · 0.85

Tested by

no test coverage detected