Update to latest rust.

This commit is contained in:
Luqman Aden
2014-07-18 18:45:52 -07:00
parent daabf3f139
commit cd4668ca72
3 changed files with 4 additions and 3 deletions
+2 -2
View File
@@ -787,7 +787,7 @@ impl Event {
Ok(window) => window,
};
let text = str::from_utf8_lossy(event.text.iter().take_while(|&b| (*b) != 0i8).map(|&b| b as u8).collect::<Vec<u8>>().as_slice()).into_string();
let text = String::from_utf8_lossy(event.text.iter().take_while(|&b| (*b) != 0i8).map(|&b| b as u8).collect::<Vec<u8>>().as_slice()).into_string();
TextEditingEvent(event.timestamp as uint, window, text,
event.start as int, event.length as int)
}
@@ -800,7 +800,7 @@ impl Event {
Ok(window) => window,
};
let text = str::from_utf8_lossy(event.text.iter().take_while(|&b| (*b) != 0i8).map(|&b| b as u8).collect::<Vec<u8>>().as_slice()).into_string();
let text = String::from_utf8_lossy(event.text.iter().take_while(|&b| (*b) != 0i8).map(|&b| b as u8).collect::<Vec<u8>>().as_slice()).into_string();
TextInputEvent(event.timestamp as uint, window, text)
}
+1 -1
View File
@@ -85,7 +85,7 @@ pub fn get_keyboard_state() -> HashMap<ScanCode, bool> {
let mut current = 0;
while current < raw.len() {
state.insert(FromPrimitive::from_int(current as int).unwrap(),
*raw.get(current) == 1);
raw[current] == 1);
current += 1;
}
+1
View File
@@ -70,6 +70,7 @@ impl<'a> Timer<'a> {
}
}
#[unsafe_destructor]
impl<'a> Drop for Timer<'a> {
fn drop(&mut self) {
if self.remove_on_drop {