mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 16:31:18 +00:00
cargo clippy
This commit is contained in:
parent
6a2ab87f49
commit
ce4b4c72df
@ -273,7 +273,7 @@ pub(super) fn render_plain(
|
||||
|
||||
pub(super) fn render_profile_link(app: &mut GossipUi, ui: &mut Ui, pubkey: &PublicKey) {
|
||||
let nam = gossip_lib::names::best_name_from_pubkey_lookup(pubkey);
|
||||
let nam = format!("{}", nam);
|
||||
let nam = nam.to_string();
|
||||
if ui.link(&nam).clicked() {
|
||||
app.set_page(Page::Person(pubkey.to_owned()));
|
||||
};
|
||||
|
@ -661,11 +661,11 @@ fn calc_tagging_search(app: &mut GossipUi) {
|
||||
pairs.sort_by(|(_,ak), (_,bk)| {
|
||||
let af = GLOBALS
|
||||
.storage
|
||||
.is_person_in_list(&ak, gossip_lib::PersonList::Followed)
|
||||
.is_person_in_list(ak, gossip_lib::PersonList::Followed)
|
||||
.unwrap_or(false);
|
||||
let bf = GLOBALS
|
||||
.storage
|
||||
.is_person_in_list(&bk, gossip_lib::PersonList::Followed)
|
||||
.is_person_in_list(bk, gossip_lib::PersonList::Followed)
|
||||
.unwrap_or(false);
|
||||
bf.cmp(&af).then(std::cmp::Ordering::Greater)
|
||||
});
|
||||
@ -952,13 +952,13 @@ fn show_tag_hovers(ui: &mut Ui, app: &mut GossipUi, output: &mut TextEditOutput)
|
||||
}
|
||||
}
|
||||
|
||||
fn do_replacements(draft: &String, replacements: &HashMap<String, ContentSegment>) -> String {
|
||||
let mut output = draft.clone();
|
||||
fn do_replacements(draft: &str, replacements: &HashMap<String, ContentSegment>) -> String {
|
||||
let mut output = draft.to_owned();
|
||||
for (pat, content) in replacements {
|
||||
if let ContentSegment::NostrUrl(nostr_url) = content {
|
||||
output = output
|
||||
.as_str()
|
||||
.replace(pat, format!("nostr:{}", nostr_url.0.to_string()).as_str())
|
||||
.replace(pat, format!("nostr:{}", nostr_url.0).as_str())
|
||||
.to_string();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user