*: returning &mut Self from setters was an awful idea

Deref breaks things.
This commit is contained in:
meh
2015-10-04 03:21:52 +02:00
parent 0764c597e4
commit 132c514e3f
16 changed files with 151 additions and 279 deletions

View File

@ -64,20 +64,16 @@ impl Audio {
}
}
pub fn set_channel_layout(&mut self, value: ChannelLayout) -> &mut Self {
pub fn set_channel_layout(&mut self, value: ChannelLayout) {
unsafe {
(*self.as_mut_ptr()).channel_layout = value.bits();
}
self
}
pub fn request_channel_layout(&mut self, value: ChannelLayout) -> &mut Self {
pub fn request_channel_layout(&mut self, value: ChannelLayout) {
unsafe {
(*self.as_mut_ptr()).request_channel_layout = value.bits();
}
self
}
pub fn audio_service(&mut self) -> AudioService {