*: refactor setters to return self

This commit is contained in:
meh
2015-09-26 18:01:23 +02:00
parent 4747a5a123
commit 510e8604b6
16 changed files with 254 additions and 116 deletions

View File

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