Skip to content

Commit 0533a57

Browse files
crumblingstatuecaryhaynie
authored andcommitted
rwops: Remove Collection impl
The `Collection` trait was removed as part of the collections reform in Rust master. Instead, we impl it for `RWops` directly.
1 parent 219730e commit 0533a57

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/sdl2/rwops.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,12 @@ impl RWops {
7272
if raw.is_null() { Err(get_error()) }
7373
else { Ok(RWops{raw: raw, close_on_drop: false}) }
7474
}
75+
76+
pub fn len(&self) -> uint {
77+
unsafe {
78+
((*self.raw).size)(self.raw) as uint
79+
}
80+
}
7581
}
7682

7783
impl Drop for RWops {
@@ -148,11 +154,3 @@ impl Seek for RWops {
148154
}
149155
}
150156
}
151-
152-
impl Collection for RWops {
153-
fn len(&self) -> uint {
154-
unsafe {
155-
((*self.raw).size)(self.raw) as uint
156-
}
157-
}
158-
}

0 commit comments

Comments
 (0)