*: 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

@ -69,30 +69,24 @@ impl Subtitle {
}
}
pub fn set_pts(&mut self, value: Option<i64>) -> &mut Self {
pub fn set_pts(&mut self, value: Option<i64>) {
self.0.pts = value.unwrap_or(AV_NOPTS_VALUE);
self
}
pub fn start(&self) -> u32 {
self.0.start_display_time as u32
}
pub fn set_start(&mut self, value: u32) -> &mut Self {
pub fn set_start(&mut self, value: u32) {
self.0.start_display_time = value as uint32_t;
self
}
pub fn end(&self) -> u32 {
self.0.end_display_time as u32
}
pub fn set_end(&mut self, value: u32) -> &mut Self {
pub fn set_end(&mut self, value: u32) {
self.0.end_display_time = value as uint32_t;
self
}
pub fn rects(&self) -> RectIter {