maidsafe / rust_sodium

This crate is no longer maintained. Looking for maintainers.
BSD 3-Clause "New" or "Revised" License
77 stars 34 forks source link

fix/build: import missing Read trait #84

Closed nshtg closed 5 years ago

nshtg commented 5 years ago

Building libsodium requires the Read trait to be imported to call the read_to_end function.

https://github.com/maidsafe/rust_sodium/blob/af37b943663150376676440eb9bc76c6ca9468ab/rust_sodium-sys/build.rs#L146

error[E0599]: no method named `read_to_end` found for type `zip::read::ZipFile<'_>` in the current scope
   --> C:\Users\***\.cargo\registry\src\github.com-1ecc6299db9ec823\rust_sodium-sys-0.10.1\build.rs:146:52
    |
146 |             assert_eq!(entry.size(), unwrap!(entry.read_to_end(&mut buffer)) as u64);
    |                                                    ^^^^^^^^^^^
    |
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
    |
17  | use std::io::Read;
    |

error: aborting due to previous error
nshtg commented 5 years ago

VSCode deleted a trailing whitespace too. :)

nshtg commented 5 years ago

@pierrechevalier83 @Viv-Rajkumar I would consider this a critical bug since it prevents compiling on windows.