Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-t committed May 6, 2024
1 parent d1a8803 commit 34972bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cvars-console-fyrox/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl FyroxConsole {
// Note that it might still be better to read the text from the UI as the souce of truth
// because right now the console doesn't know about any text we set from code on init.
if let Some(TextMessage::Text(text)) = msg.data() {
self.console.prompt.clone_from(text);
self.console.prompt.clone_from(&text);
}

match msg.data() {
Expand Down
4 changes: 2 additions & 2 deletions cvars-console/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl Console {
if self.prompt_saved.is_none() {
self.prompt_saved = Some(self.prompt.clone());
}
self.prompt.clone_from(self.history[new_index].text);
self.prompt.clone_from(&self.history[new_index].text);
}
}

Expand All @@ -81,7 +81,7 @@ impl Console {
// instead of using it directly.
let new_index = begin + local_index;
self.prompt_history_index = Some(new_index);
self.prompt.clone_from(self.history[new_index].text);
self.prompt.clone_from(&self.history[new_index].text);
} else {
// We're at the end of history, restore the saved prompt.
self.prompt_history_index = None;
Expand Down

0 comments on commit 34972bc

Please sign in to comment.