Skip to content

Commit 1a6a1ad

Browse files
committed
examples: satisfy Rust 1.97 clippy
1 parent f945f67 commit 1a6a1ad

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • examples/16_full_metal_app

examples/16_full_metal_app/ui.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ impl VertexBufferBuilder {
9999
("Select a Source to Begin".to_string(), [0.6, 0.5, 0.7, 1.0])
100100
} else if has_source {
101101
let display = if source_name.len() > 30 {
102-
format!("{}...", &source_name.chars().take(27).collect::<String>())
102+
format!("{}...", source_name.chars().take(27).collect::<String>())
103103
} else {
104104
source_name.to_string()
105105
};
@@ -176,7 +176,7 @@ impl VertexBufferBuilder {
176176
if !format_info.is_empty() {
177177
// Truncate if too long
178178
let display_info = if format_info.len() > 40 {
179-
format!("{}...", &format_info.chars().take(37).collect::<String>())
179+
format!("{}...", format_info.chars().take(37).collect::<String>())
180180
} else {
181181
format_info.to_string()
182182
};
@@ -293,7 +293,7 @@ impl VertexBufferBuilder {
293293
self.text(font, name, text_x, text_y, scale, name_color);
294294

295295
let t: String = if value.len() > 12 {
296-
format!("{}...", &value.chars().take(9).collect::<String>())
296+
format!("{}...", value.chars().take(9).collect::<String>())
297297
} else {
298298
value
299299
};

0 commit comments

Comments
 (0)