Skip to content

Commit a2a2175

Browse files
Merged Rust compilation into existing case
I added the rust compilation code to an existing case instead of creating a new one, as it could have been included in the c/cpp/haskell case, to avoid unnecessary duplication.
1 parent 397baf0 commit a2a2175

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

src/features/run_test_cases/run_solution.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export const runTestsWithTimeout = async (
3838
case CompilationLanguages.gcc:
3939
case CompilationLanguages.cpp:
4040
case CompilationLanguages.haskell:
41+
case CompilationLanguages.rust:
4142
if (os === OS.linuxMac) {
4243
// Command for linux
4344
executable = `${executableFileName}.out`;
@@ -90,17 +91,6 @@ export const runTestsWithTimeout = async (
9091
? "java.exe"
9192
: "java";
9293
break;
93-
case CompilationLanguages.rust:
94-
// const rustClassPath: string = solutionFilePath.slice(
95-
// 0,
96-
// solutionFilePath.lastIndexOf("/")
97-
// );
98-
// console.log(rustClassPath);
99-
runCommand = `rustc "${testsFolderPath}${executableFileName}.out" < "${inputFilePath}" > "${codeOutputFilePath}"`;
100-
executable = (os === OS.windows)
101-
? "rust.exe"
102-
: "rust";
103-
break;
10494

10595
default:
10696
vscode.window.showErrorMessage("Language used is not supported");

0 commit comments

Comments
 (0)