diff --git a/src/sdl2/event.rs b/src/sdl2/event.rs index 5c912fa1..bd1f4664 100644 --- a/src/sdl2/event.rs +++ b/src/sdl2/event.rs @@ -799,7 +799,7 @@ impl Event { }; let text = str::from_utf8_lossy(event.text.iter().take_while(|&b| (*b) != 0i8).map(|&b| b as u8).collect::>().as_slice()).into_owned(); - TextInputEvent(event.timestamp as uint, window, text.to_owned()) + TextInputEvent(event.timestamp as uint, window, text) } MouseMotionEventType => {