Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Remove unnecessarily general `keystroke_label_for` function

Antonio Scandurra06b12bbb682c
diff --git a/crates/theme/src/ui.rs b/crates/theme/src/ui.rs
index 0f58ee08ad5..1198e81e92b 100644
--- a/crates/theme/src/ui.rs
+++ b/crates/theme/src/ui.rs
@@ -139,27 +139,11 @@ pub fn keystroke_label<V: View>(
) -> Container<V> {
// FIXME: Put the theme in it's own global so we can
// query the keystroke style on our own
- keystroke_label_for(
- cx.handle().id(),
- label_text,
- label_style,
- keystroke_style,
- action,
- )
-}
-
-pub fn keystroke_label_for<V: View>(
- view_id: usize,
- label_text: &'static str,
- label_style: &ContainedText,
- keystroke_style: &ContainedText,
- action: Box<dyn Action>,
-) -> Container<V> {
Flex::row()
.with_child(Label::new(label_text, label_style.text.clone()).contained())
.with_child(
KeystrokeLabel::new(
- view_id,
+ cx.view_id(),
action,
keystroke_style.container,
keystroke_style.text.clone(),