Skip to content

Commit 3a6de2c

Browse files
committed
Fix warnings for unimplemented Copy traits
Types that can implement Copy now warn when they don't. Added deriving directives.
1 parent a60bd9e commit 3a6de2c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ll.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@ pub type va_list = *mut u8;
3232

3333
/* Custom Types. */
3434
#[repr(C)]
35+
#[deriving(Copy)]
3536
pub struct WINDOW_impl;
3637
#[repr(C)]
38+
#[deriving(Copy)]
3739
pub struct SCREEN_impl;
3840
#[repr(C)]
41+
#[deriving(Copy)]
3942
pub struct MEVENT { id: c_short, x: c_int, y: c_int, z: c_int, bstate: mmask_t}
4043

4144
macro_rules! define_sharedffi(

src/ncurses.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ pub use self::constants::*;
2626
pub mod ll;
2727
pub mod constants;
2828

29+
#[deriving(Copy)]
2930
pub enum CURSOR_VISIBILITY
3031
{
3132
CURSOR_INVISIBLE = 0,

0 commit comments

Comments
 (0)