Skip to content

Commit 14b6c0b

Browse files
committed
update to last Rust
- impl trait Copy
1 parent cb61e25 commit 14b6c0b

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

src/ears.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ use ears::Music;
9494
#![license = "MIT"]
9595
#![crate_type = "dylib"]
9696
#![crate_type = "rlib"]
97-
#![allow(dead_code)]
97+
#![allow(dead_code, unused_attributes)]
9898
#![feature(macro_rules)]
9999
#![feature(unsafe_destructor)]
100100

src/record_context.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
use openal::ffi;
2525

2626
/// The context needed to initialize a new Recorder
27-
#[deriving(Clone, PartialEq, Show)]
27+
#[deriving(Clone, PartialEq, Show, Copy)]
2828
pub struct RecordContext {
2929
capt_device: *mut ffi::ALCdevice
3030
}

src/sndfile.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ pub struct SndInfo {
6464
/// * Read - Read only mode
6565
/// * Write - Write only mode
6666
/// * ReadWrite - Read and Write mode
67+
#[deriving(Copy)]
6768
pub enum OpenMode {
6869
Read = ffi::SFM_READ as int,
6970
Write = ffi::SFM_WRITE as int,
7071
ReadWrite = ffi::SFM_RDWR as int
7172
}
7273

7374
/// Type of strings available for method get_string()
75+
#[deriving(Copy)]
7476
pub enum StringSoundType {
7577
Title = ffi::SF_STR_TITLE as int,
7678
Copyright = ffi::SF_STR_COPYRIGHT as int,
@@ -86,6 +88,7 @@ pub enum StringSoundType {
8688

8789
/// Types of error who can be return by API functions
8890
#[repr(C)]
91+
#[deriving(Copy)]
8992
pub enum Error {
9093
NoError = ffi::SF_ERR_NO_ERROR as int,
9194
UnrecognizedFormat = ffi::SF_ERR_UNRECOGNISED_FORMAT as int,
@@ -100,6 +103,7 @@ pub enum Error {
100103
/// * SeekSet - The offset is set to the start of the audio data plus offset (multichannel) frames.
101104
/// * SeekCur - The offset is set to its current location plus offset (multichannel) frames.
102105
/// * SeekEnd - The offset is set to the end of the data plus offset (multichannel) frames.
106+
#[deriving(Copy)]
103107
pub enum SeekMode {
104108
SeekSet = ffi::SEEK_SET as int,
105109
SeekCur = ffi::SEEK_CUR as int,
@@ -161,7 +165,7 @@ pub enum SeekMode {
161165
/// * EndianBig - Force big endian-ness
162166
/// * EndianCpu - Force CPU endian-ness
163167
#[repr(C)]
164-
#[deriving(Show, Clone, PartialOrd, PartialEq)]
168+
#[deriving(Show, Clone, PartialOrd, PartialEq, Copy)]
165169
pub enum FormatType {
166170
FormatWav = ffi::SF_FORMAT_WAV as int,
167171
FormatAiff = ffi::SF_FORMAT_AIFF as int,

src/states.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
//! The states of a Sound or a Music
2323
2424
/// The differents states in which a sound can be.
25-
#[deriving(Clone, PartialEq, PartialOrd, Show)]
25+
#[deriving(Clone, PartialEq, PartialOrd, Show, Copy)]
2626
pub enum State {
2727
/// Initial state of the sound or music
2828
Initial,

0 commit comments

Comments
 (0)