From 2b688d48587f26c097a55a9fb329c0d8077b589a Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Fri, 13 Mar 2020 21:20:41 -0700 Subject: [PATCH] Trigger build on pushes and pull requests (#607) --- .github/workflows/main.yaml | 9 ++++++++- src/function.rs | 1 - src/lib.rs | 5 +++-- src/shebang.rs | 2 +- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 396cc79..262c0b4 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,9 +1,16 @@ name: Build -on: [push] +on: + push: + branches: + - master + pull_request: + branches: + - master jobs: all: + name: All strategy: matrix: os: diff --git a/src/function.rs b/src/function.rs index e7ca280..4505198 100644 --- a/src/function.rs +++ b/src/function.rs @@ -1,6 +1,5 @@ use crate::common::*; -use target; use Function::*; pub(crate) enum Function { diff --git a/src/lib.rs b/src/lib.rs index cf59240..24d17e5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,8 +8,10 @@ clippy::implicit_return, clippy::indexing_slicing, clippy::integer_arithmetic, + clippy::let_underscore_must_use, clippy::match_same_arms, clippy::missing_docs_in_private_items, + clippy::missing_errors_doc, clippy::missing_inline_in_public_items, clippy::needless_pass_by_value, clippy::non_ascii_literal, @@ -24,8 +26,7 @@ clippy::too_many_lines, clippy::unreachable, clippy::use_debug, - clippy::wildcard_enum_match_arm, - clippy::missing_errors_doc + clippy::wildcard_enum_match_arm )] #[macro_use] diff --git a/src/shebang.rs b/src/shebang.rs index b9e7b66..d74ac34 100644 --- a/src/shebang.rs +++ b/src/shebang.rs @@ -11,7 +11,7 @@ impl<'line> Shebang<'line> { let mut pieces = line[2..] .lines() - .nth(0) + .next() .unwrap_or("") .trim() .splitn(2, |c| c == ' ' || c == '\t');