1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 22:00:03 -04:00

Enable and fix a bunch more lints

This commit is contained in:
Emil Ernerfeldt
2022-07-11 23:08:48 +02:00
parent e76c919c7e
commit 898f4804b7
21 changed files with 65 additions and 48 deletions

View File

@@ -147,7 +147,7 @@ impl super::View for DragAndDropDemo {
let response = response.context_menu(|ui| {
if ui.button("New Item").clicked() {
self.columns[col_idx].push("New Item".to_string());
self.columns[col_idx].push("New Item".to_owned());
ui.close_menu();
}
});

View File

@@ -647,7 +647,7 @@ fn text_layout_ui(
ui.label("Overflow character");
});
let mut job = LayoutJob::single_section(LOREM_IPSUM.to_string(), TextFormat::default());
let mut job = LayoutJob::single_section(LOREM_IPSUM.to_owned(), TextFormat::default());
job.wrap = TextWrapping {
max_rows: *max_rows,
break_anywhere: *break_anywhere,

View File

@@ -621,7 +621,7 @@ impl InteractionDemo {
let coordinate_text = if let Some(coordinate) = pointer_coordinate {
format!("x: {:.02}, y: {:.02}", coordinate.x, coordinate.y)
} else {
"None".to_string()
"None".to_owned()
};
ui.label(format!("pointer coordinate: {}", coordinate_text));
let coordinate_text = format!(