Skip to content

Commit

Permalink
More clippy suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
dbr committed May 5, 2024
1 parent fb5133c commit 1d4f3db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions imgui-examples/examples/text_callbacks.rs
Expand Up @@ -4,7 +4,7 @@ mod support;

fn main() {
let system = support::init(file!());
let mut buffers = vec![String::default(), String::default(), String::default()];
let mut buffers = [String::default(), String::default(), String::default()];

system.main_loop(move |_, ui| {
ui.window("Input text callbacks")
Expand Down Expand Up @@ -70,7 +70,7 @@ fn main() {
struct Wrapper<'a>(&'a mut String);
impl<'a> InputTextCallbackHandler for Wrapper<'a> {
fn on_always(&mut self, data: TextCallbackData) {
*self.0 = data.str().to_owned();
data.str().clone_into(self.0);
}
}

Expand Down

0 comments on commit 1d4f3db

Please sign in to comment.