Skip to content

Commit

Permalink
fix: unused test imports on non-nightly, prevent regression
Browse files Browse the repository at this point in the history
  • Loading branch information
calebcartwright committed Feb 24, 2022
1 parent 281bf03 commit 89ca3f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ jobs:
rustc -Vv
cargo -V
cargo build
env:
RUSTFLAGS: '-D warnings'

- name: test
run: cargo test
env:
RUSTFLAGS: '-D warnings'
9 changes: 4 additions & 5 deletions src/ignore_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ impl IgnorePathSet {

#[cfg(test)]
mod test {
use std::path::{Path, PathBuf};

use crate::config::{Config, FileName};
use crate::ignore_path::IgnorePathSet;

use rustfmt_config_proc_macro::nightly_only_test;

#[nightly_only_test]
#[test]
fn test_ignore_path_set() {
use crate::config::{Config, FileName};
use crate::ignore_path::IgnorePathSet;
use std::path::{Path, PathBuf};

let config =
Config::from_toml(r#"ignore = ["foo.rs", "bar_dir/*"]"#, Path::new("")).unwrap();
let ignore_path_set = IgnorePathSet::from_ignore_list(&config.ignore()).unwrap();
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#![warn(unreachable_pub)]
#![recursion_limit = "256"]
#![allow(clippy::match_like_matches_macro)]
#![allow(unreachable_pub)]

#[macro_use]
extern crate derive_new;
Expand Down

0 comments on commit 89ca3f3

Please sign in to comment.