We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents dd84cc5 + 5643ef0 commit a9dae71Copy full SHA for a9dae71
src/exercise.rs
@@ -11,10 +11,15 @@ const I_AM_DONE_REGEX: &str = r"(?m)^\s*///?\s*I\s+AM\s+NOT\s+DONE";
11
const CONTEXT: usize = 2;
12
const CLIPPY_CARGO_TOML_PATH: &str = "./exercises/clippy/Cargo.toml";
13
14
-// Get a temporary file name that is hopefully unique to this process
+// Get a temporary file name that is hopefully unique
15
#[inline]
16
fn temp_file() -> String {
17
- format!("./temp_{}", process::id())
+ let thread_id: String = format!("{:?}", std::thread::current().id())
18
+ .chars()
19
+ .filter(|c| c.is_alphanumeric())
20
+ .collect();
21
+
22
+ format!("./temp_{}_{}", process::id(), thread_id)
23
}
24
25
// The mode of the exercise.
0 commit comments