We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b0f3cb commit 9f616cbCopy full SHA for 9f616cb
src/file_manager/git.rs
@@ -6,6 +6,7 @@ use std::path::PathBuf;
6
use tokio::fs;
7
8
const UPLOAD_DIR: &str = "uploads";
9
+const DEFAULT_DIRECTORIES: [&str; 3] = ["solutions", "tests", "statements"];
10
11
#[derive(Debug)]
12
struct GitManager {
@@ -121,8 +122,7 @@ impl GitManager {
121
122
123
async fn create_default_directories(&self) -> Result<()> {
124
let base_path = PathBuf::from(UPLOAD_DIR).join(self.problem_id.to_string());
- let directories = ["solutions", "tests", "statements"];
125
- for dir in directories {
+ for dir in DEFAULT_DIRECTORIES {
126
let path = base_path.join(dir);
127
fs::create_dir_all(path)
128
.await
0 commit comments