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

Run clippy on non-default features, too #516

Merged
merged 1 commit into from
Sep 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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