Cleanup textinput, timers

This commit is contained in:
Manish Goregaokar 2015-08-15 05:06:21 +05:30
parent 53e155e8ac
commit ac1b7a3896
2 changed files with 6 additions and 5 deletions

View file

@ -292,10 +292,11 @@ impl<T: ClipboardProvider> TextInput<T> {
/// Deal with a newline input. /// Deal with a newline input.
pub fn handle_return(&mut self) -> KeyReaction { pub fn handle_return(&mut self) -> KeyReaction {
if !self.multiline { if !self.multiline {
return KeyReaction::TriggerDefaultAction; KeyReaction::TriggerDefaultAction
} } else {
self.insert_char('\n'); self.insert_char('\n');
return KeyReaction::DispatchInput; KeyReaction::DispatchInput
}
} }
/// Select all text in the input control. /// Select all text in the input control.

View file

@ -222,8 +222,8 @@ impl TimerManager {
for _ in 0..arguments.len() { for _ in 0..arguments.len() {
timer.data.args.push(Heap::default()); timer.data.args.push(Heap::default());
} }
for i in 0..arguments.len() { for (i, item) in arguments.iter().enumerate() {
timer.data.args.get_mut(i).unwrap().set(arguments[i].get()); timer.data.args.get_mut(i).unwrap().set(item.get());
} }
handle handle
} }