Skip to content

Commit 62cb05c

Browse files
committed
Update to Rust Edition 2024
1 parent 9ded61c commit 62cb05c

File tree

4 files changed

+76
-63
lines changed

4 files changed

+76
-63
lines changed

Cargo.lock

+67-60
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ authors = [
88
homepage = "https://tokay.dev/"
99
repository = "https://github.com/tokay-lang/tokay/"
1010
license = "MIT"
11-
edition = "2021"
11+
edition = "2024"
1212
categories = [
1313
"parsing",
1414
"compilers",

src/compiler/compiler.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,10 @@ impl Compiler {
187187

188188
// When TOKAY_LOG is set, set RUST_LOG to the setting *after* internal compilations
189189
if let Ok(log) = std::env::var("TOKAY_LOG") {
190-
std::env::set_var("RUST_LOG", log.clone());
190+
// FIXME: Avoid use of unsafe!
191+
unsafe {
192+
std::env::set_var("RUST_LOG", log.clone());
193+
}
191194
env_logger::init();
192195
}
193196

src/main.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,10 @@ fn main() -> rustyline::Result<()> {
195195

196196
// Set TOKAY_DEBUG when debug flag was set.
197197
if opts.debug > 0 {
198-
std::env::set_var("TOKAY_DEBUG", format!("{}", opts.debug));
198+
// FIXME: Avoid use of unsafe!
199+
unsafe {
200+
std::env::set_var("TOKAY_DEBUG", format!("{}", opts.debug));
201+
}
199202
}
200203

201204
// Show license and exit?

0 commit comments

Comments
 (0)