chore: update gpui and nostr-sdk
This commit is contained in:
@@ -518,7 +518,7 @@ impl TabPanel {
|
||||
};
|
||||
|
||||
Some(
|
||||
Button::new(SharedString::from(format!("toggle-dock:{:?}", placement)))
|
||||
Button::new(SharedString::from(format!("toggle-dock:{placement:?}")))
|
||||
.icon(icon)
|
||||
.small()
|
||||
.ghost()
|
||||
|
||||
@@ -102,11 +102,11 @@ impl RenderOnce for EmojiPicker {
|
||||
input.update(cx, |this, cx| {
|
||||
let current = this.value();
|
||||
let new_text = if current.is_empty() {
|
||||
format!("{}", item)
|
||||
format!("{item}")
|
||||
} else if current.ends_with(" ") {
|
||||
format!("{}{}", current, item)
|
||||
format!("{current}{item}")
|
||||
} else {
|
||||
format!("{} {}", current, item)
|
||||
format!("{current} {item}")
|
||||
};
|
||||
this.set_value(new_text, window, cx);
|
||||
});
|
||||
|
||||
@@ -302,7 +302,7 @@ impl MaskPattern {
|
||||
if fraction == &Some(0) {
|
||||
int_with_sep
|
||||
} else {
|
||||
format!("{}.{}", int_with_sep, frac)
|
||||
format!("{int_with_sep}.{frac}")
|
||||
}
|
||||
} else {
|
||||
int_with_sep
|
||||
|
||||
@@ -50,7 +50,7 @@ pub trait PopupMenuExt: Styled + Selectable + IntoElement + 'static {
|
||||
let style = self.style().clone();
|
||||
let element_id = self.element_id();
|
||||
|
||||
Popover::new(SharedString::from(format!("popup-menu:{:?}", element_id)))
|
||||
Popover::new(SharedString::from(format!("popup-menu:{element_id:?}")))
|
||||
.no_style()
|
||||
.trigger(self)
|
||||
.trigger_style(style)
|
||||
@@ -716,7 +716,7 @@ impl Render for PopupMenu {
|
||||
/// Return the Platform specific keybinding string by KeyStroke
|
||||
pub fn key_shortcut(key: Keystroke) -> String {
|
||||
if cfg!(target_os = "macos") {
|
||||
return format!("{}", key);
|
||||
return format!("{key}");
|
||||
}
|
||||
|
||||
let mut parts = vec![];
|
||||
|
||||
@@ -293,7 +293,7 @@ pub fn render_plain_text_mut(
|
||||
|
||||
// Make it clickable
|
||||
link_ranges.push(new_range);
|
||||
link_urls.push(format!("mention:{}", entity_without_prefix));
|
||||
link_urls.push(format!("mention:{entity_without_prefix}"));
|
||||
|
||||
// Adjust subsequent ranges if needed
|
||||
if length_diff != 0 {
|
||||
@@ -301,11 +301,11 @@ pub fn render_plain_text_mut(
|
||||
}
|
||||
} else {
|
||||
// No profile match or not a profile entity - create njump.me link
|
||||
let njump_url = format!("https://njump.me/{}", entity_without_prefix);
|
||||
let njump_url = format!("https://njump.me/{entity_without_prefix}");
|
||||
|
||||
// Create a shortened display format for the URL
|
||||
let shortened_entity = format_shortened_entity(entity_without_prefix);
|
||||
let display_text = format!("https://njump.me/{}", shortened_entity);
|
||||
let display_text = format!("https://njump.me/{shortened_entity}");
|
||||
|
||||
// Replace the original entity with the shortened display version
|
||||
text.replace_range(range.clone(), &display_text);
|
||||
@@ -350,7 +350,7 @@ fn format_shortened_entity(entity: &str) -> String {
|
||||
let prefix = &entity[0..=prefix_end]; // Include the '1'
|
||||
let suffix = &entity[entity.len() - 4..]; // Last 4 chars
|
||||
|
||||
format!("{}...{}", prefix, suffix)
|
||||
format!("{prefix}...{suffix}")
|
||||
} else {
|
||||
entity.to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user