Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Run clippy on non-default features, too
Browse files Browse the repository at this point in the history
This fixes the CI failure in
#515 (comment) and
is generally good practice.
  • Loading branch information
jyn514 committed Sep 13, 2020
1 parent 231bd0d commit 98f678e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ fn error<T: std::fmt::Display>(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",
Expand Down
2 changes: 1 addition & 1 deletion tests/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion tests/runner-tests/hello_world.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include<stdio.h>
int puts(const char *);

int main() {
puts("Hello, world!");
Expand Down

0 comments on commit 98f678e

Please sign in to comment.