Skip to content

Commit

Permalink
windows: fix unused warnings on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
BurntSushi committed Sep 5, 2018
1 parent 241bc8f commit fd22cd5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grep-cli/src/pattern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ pub fn patterns_from_reader<R: io::Read>(rdr: R) -> io::Result<Vec<String>> {

#[cfg(test)]
mod tests {
use super::{pattern_from_bytes, pattern_from_os};
use super::*;

#[test]
fn bytes() {
Expand Down
4 changes: 3 additions & 1 deletion ignore/src/walk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1704,7 +1704,7 @@ mod tests {

use tempdir::TempDir;

use super::{DirEntry, WalkBuilder, WalkState, device_num};
use super::{DirEntry, WalkBuilder, WalkState};

fn wfile<P: AsRef<Path>>(path: P, contents: &str) {
let mut file = File::create(path).unwrap();
Expand Down Expand Up @@ -2019,6 +2019,8 @@ mod tests {
#[test]
#[cfg(target_os = "linux")]
fn same_file_system() {
use super::device_num;

// If for some reason /sys doesn't exist or isn't a directory, just
// skip this test.
if !Path::new("/sys").is_dir() {
Expand Down

0 comments on commit fd22cd5

Please sign in to comment.