Skip to content

Commit

Permalink
fix cargo-clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
baoyachi committed Jun 20, 2022
1 parent b51bff1 commit ec079d4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: Check fix
run: cargo fix && cargo fix
- name: Check with clippy
run: cargo clippy --all -- -D warnings
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Build Release
run: cargo build --release
- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion src/git.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ mod tests {
//assert github tag always exist value
if let Some(github_ref) = env_map.get("GITHUB_REF") {
if github_ref.starts_with("refs/tags/") && k.eq(TAG) {
assert!(!v.v.is_empty());
assert!(!v.v.is_empty(), "not empty");
} else if github_ref.starts_with("refs/heads/") && k.eq(BRANCH) {
assert!(!v.v.is_empty());
}
Expand Down
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -478,9 +478,8 @@ mod tests {
fn test_build() -> SdResult<()> {
Shadow::build_inner("./".into(), "./".into())?;
let shadow = fs::read_to_string("./shadow.rs")?;
assert!(shadow.len() > 0);
let lines: Vec<_> = shadow.lines().map(|_| true).collect();
assert!(lines.len() > 0);
assert!(!shadow.is_empty());
assert!(shadow.lines().count() > 0);
println!("{}", shadow);
Ok(())
}
Expand Down

0 comments on commit ec079d4

Please sign in to comment.