]> git.lizzy.rs Git - rust.git/commitdiff
Try fixing test on i686-unknown-linux-gnu
authorDavid Cook <divergentdave@gmail.com>
Wed, 29 Jan 2020 01:04:16 +0000 (19:04 -0600)
committerDavid Cook <divergentdave@gmail.com>
Wed, 29 Jan 2020 01:04:16 +0000 (19:04 -0600)
tests/run-pass/libc.rs

index 8ba97e2e435635022c18a9f2eeb04626fa7a7f1a..25f96b472b236c9b9abe8113ab769672d220c4fa 100644 (file)
@@ -5,6 +5,7 @@
 
 extern crate libc;
 
+use std::convert::TryInto;
 use std::env::temp_dir;
 use std::fs::{File, remove_file};
 use std::io::Write;
@@ -25,7 +26,7 @@ fn main() {
         libc::posix_fadvise(
             file.as_raw_fd(),
             0,
-            bytes.len() as i64,
+            bytes.len().try_into().unwrap(),
             libc::POSIX_FADV_DONTNEED,
         )
     };