Fix warnings when the "wasm" feature is disabled.

This commit is contained in:
Dan Gohman
2018-11-28 16:08:26 -08:00
parent 9f7a7fa389
commit f8754c2cf8
2 changed files with 20 additions and 16 deletions

View File

@@ -25,6 +25,7 @@ pub fn read_to_string<P: AsRef<Path>>(path: P) -> io::Result<String> {
}
/// Read an entire file into a vector of bytes.
#[cfg(feature = "wasm")]
pub fn read_to_end<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
let mut buffer = Vec::new();
if path.as_ref() == Path::new("-") {