chore(fmt): add legacy stubs and strip trailing whitespace to unblock cargo fmt

This commit is contained in:
Selfhosting Dev
2025-09-17 07:43:07 +09:00
parent fcf8ce1f3c
commit adbb0201a9
385 changed files with 35622 additions and 15004 deletions

View File

@ -5,8 +5,13 @@ thread_local! {
}
pub fn is_enabled_env() -> bool {
if std::env::var("NYASH_FORCE_SUGAR").ok().as_deref() == Some("1") { return true; }
matches!(std::env::var("NYASH_SYNTAX_SUGAR_LEVEL").ok().as_deref(), Some("basic") | Some("full"))
if std::env::var("NYASH_FORCE_SUGAR").ok().as_deref() == Some("1") {
return true;
}
matches!(
std::env::var("NYASH_SYNTAX_SUGAR_LEVEL").ok().as_deref(),
Some("basic") | Some("full")
)
}
pub fn is_enabled() -> bool {
@ -22,4 +27,3 @@ pub fn with_enabled<T>(f: impl FnOnce() -> T) -> T {
r
})
}