Skip to content

Commit f2d7bc6

Browse files
committed
Fix compilation error with use_tokio
1 parent 6f7792a commit f2d7bc6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ use std::fs;
5454
use std::fs::File;
5555
use std::io;
5656
use std::io::prelude::*;
57-
#[cfg(any(target_os = "linux", target_os = "android"))]
57+
#[cfg(any(target_os = "linux", target_os = "android", feature = "use_tokio"))]
5858
use std::io::SeekFrom;
5959
use std::os::unix::prelude::*;
6060
use std::path::Path;
@@ -123,7 +123,7 @@ fn flush_input_from_file(dev_file: &mut File, max: usize) -> io::Result<usize> {
123123
}
124124

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

0 commit comments

Comments
 (0)