mirror of
https://github.com/tribufu/rust-gamedig
synced 2026-05-18 09:35:50 +00:00
fix: various crate/clippy/ci changes (#181)
* crate: Set default binary to gamedig-cli * crate: Fix bad no-default-features option on gamedig-id dependency * ci: Run tests when Cargo.toml changes * id-tests: Clippy fixes
This commit is contained in:
parent
0f9bada4f3
commit
32dd486632
5 changed files with 12 additions and 11 deletions
|
|
@ -150,8 +150,8 @@ pub fn test_game_name_rule(
|
|||
let mut game_names_same = other_game_name_words.len() == game.words.len();
|
||||
// Check all words in game name are the same
|
||||
if game_names_same {
|
||||
for i in 0 .. game.words.len() {
|
||||
if game.words[i].to_lowercase() != other_game_name_words[i].to_lowercase() {
|
||||
for (our_word, their_word) in game.words.iter().zip(other_game_name_words.iter()) {
|
||||
if our_word.to_lowercase() != their_word.to_lowercase() {
|
||||
game_names_same = false;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ struct Game {
|
|||
use gamedig_id_tests::test_game_name_rules;
|
||||
|
||||
fn main() {
|
||||
let games: GamesInput = if let Some(file) = std::env::args_os().skip(1).next() {
|
||||
let games: GamesInput = if let Some(file) = std::env::args_os().nth(1) {
|
||||
let file = std::fs::OpenOptions::new().read(true).open(file).unwrap();
|
||||
|
||||
serde_json::from_reader(file).unwrap()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue