Reduce allocations (#30693)
Removes a unnecessary string conversion and some clones Release Notes: - N/A
This commit is contained in:
@@ -77,7 +77,7 @@ impl QuickActionBar {
|
||||
|
||||
let menu_state = session_state(session.clone(), cx);
|
||||
|
||||
let id = "repl-menu".to_string();
|
||||
let id = "repl-menu";
|
||||
|
||||
let element_id = |suffix| ElementId::Name(format!("{}-{}", id, suffix).into());
|
||||
|
||||
@@ -99,8 +99,7 @@ impl QuickActionBar {
|
||||
.child(
|
||||
Label::new(format!(
|
||||
"kernel: {} ({})",
|
||||
menu_state.kernel_name.clone(),
|
||||
menu_state.kernel_language.clone()
|
||||
menu_state.kernel_name, menu_state.kernel_language
|
||||
))
|
||||
.size(LabelSize::Small)
|
||||
.color(Color::Muted),
|
||||
@@ -121,7 +120,7 @@ impl QuickActionBar {
|
||||
menu.custom_row(move |_window, _cx| {
|
||||
h_flex()
|
||||
.child(
|
||||
Label::new(format!("{}...", status.clone().to_string()))
|
||||
Label::new(format!("{}...", status.to_string()))
|
||||
.size(LabelSize::Small)
|
||||
.color(Color::Muted),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user