Skip to content

Commit

Permalink
Fix compilation error with use_tokio
Browse files Browse the repository at this point in the history
  • Loading branch information
pheki committed Mar 11, 2020
1 parent 6f7792a commit f2d7bc6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ use std::fs;
use std::fs::File;
use std::io;
use std::io::prelude::*;
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android", feature = "use_tokio"))]
use std::io::SeekFrom;
use std::os::unix::prelude::*;
use std::path::Path;
Expand Down Expand Up @@ -123,7 +123,7 @@ fn flush_input_from_file(dev_file: &mut File, max: usize) -> io::Result<usize> {
}

/// Get the pin value from the provided file
#[cfg(any(target_os = "linux", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android", feature = "use_tokio"))]
fn get_value_from_file(dev_file: &mut File) -> Result<u8> {
let mut s = String::with_capacity(10);
dev_file.seek(SeekFrom::Start(0))?;
Expand Down

0 comments on commit f2d7bc6

Please sign in to comment.