Skip to content

Commit 2d78fd0

Browse files
committed
Fix create_dir issue
Didn't catch this as of course it was cached on my machine :p Use create_dir_all. I initially used create_dir as I wasn't planning on joining by anything more than just constime.
1 parent 1b22d43 commit 2d78fd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "constime"
33
description = "Zig's comptime for Rust with zero dependencies. Mostly something to play around with until more stuff is const fn."
4-
version = "0.4.0"
4+
version = "0.4.1"
55

66
authors = ["David Cruz <[email protected]>"]
77
repository = "https://github.com/DvvCz/Constime"

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ pub fn comptime(mut code: TokenStream) -> TokenStream {
5151
// Join by crate_name in the rare case of identical blocks across crates
5252
let constime_base = std::env::temp_dir().join("constime").join(crate_name);
5353
if !constime_base.exists() {
54-
if let Err(why) = std::fs::create_dir(&constime_base) {
54+
if let Err(why) = std::fs::create_dir_all(&constime_base) {
5555
return build_error!("Failed to create temp directory: {why}");
5656
}
5757
}

0 commit comments

Comments
 (0)