From f526d24911e3944f8cccaa4e1a49208c27134f7b Mon Sep 17 00:00:00 2001 From: Ben S Date: Fri, 4 Sep 2015 11:17:59 +0100 Subject: [PATCH] Remove trivial cast --- src/main.rs | 2 ++ src/term.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 7e540de..8b2c326 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,8 @@ #![feature(convert, fs_mode)] #![feature(slice_splits, vec_resize)] +#![warn(trivial_casts, trivial_numeric_casts)] + extern crate ansi_term; extern crate datetime; extern crate getopts; diff --git a/src/term.rs b/src/term.rs index 15b9b0d..4c2ba18 100644 --- a/src/term.rs +++ b/src/term.rs @@ -25,7 +25,7 @@ mod c { pub unsafe fn dimensions() -> Winsize { let mut window: Winsize = zeroed(); - ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut window as *mut Winsize); + ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut window); window } }