diff --git a/src/main.rs b/src/main.rs index d5ec1253..bfbe1f35 100644 --- a/src/main.rs +++ b/src/main.rs @@ -428,7 +428,7 @@ fn error(msg: T, location: Location, file_db: &Files, colo let err = { use rand::Rng; - let name = std::env::var("USER").unwrap_or("programmer".into()); + let name = std::env::var("USER").unwrap_or_else(|_| "programmer".into()); shut_up = format!("Shut up, {}. I don't ever want to hear that kind of obvious garbage and idiocy from a developer again", name); let msgs = [ "you can't write code", diff --git a/tests/pre-commit.sh b/tests/pre-commit.sh index d31dd0fd..b1ad231d 100755 --- a/tests/pre-commit.sh +++ b/tests/pre-commit.sh @@ -1,5 +1,5 @@ #!/bin/sh set -ev cargo fmt --all -- --check -cargo clippy --all -- -D clippy::all -D unused-imports +cargo clippy --all --all-features -- -D clippy::all -D unused-imports cargo test --all --all-features diff --git a/tests/runner-tests/hello_world.c b/tests/runner-tests/hello_world.c index 5bcf3424..4d5bc093 100644 --- a/tests/runner-tests/hello_world.c +++ b/tests/runner-tests/hello_world.c @@ -1,4 +1,4 @@ -#include +int puts(const char *); int main() { puts("Hello, world!");