mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-19 11:43:43 +00:00
clippy and fmt
This commit is contained in:
parent
d057ad67d1
commit
1d294204b4
@ -707,7 +707,7 @@ impl Overlord {
|
|||||||
// Add a 'p' tag for the author we are replying to (except if it is our own key)
|
// Add a 'p' tag for the author we are replying to (except if it is our own key)
|
||||||
if let Some(pubkey) = GLOBALS.signer.read().await.public_key() {
|
if let Some(pubkey) = GLOBALS.signer.read().await.public_key() {
|
||||||
if pubkey != event.pubkey {
|
if pubkey != event.pubkey {
|
||||||
add_pubkey_to_tags(&mut tags, pubkey.into());
|
add_pubkey_to_tags(&mut tags, pubkey);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ pub fn keys_from_text(text: &str) -> Vec<(String, PublicKey)> {
|
|||||||
if !npub.starts_with("npub1") {
|
if !npub.starts_with("npub1") {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
PublicKey::try_from_bech32_string(&npub)
|
PublicKey::try_from_bech32_string(npub)
|
||||||
.ok()
|
.ok()
|
||||||
.map(|pubkey| (npub.to_string(), pubkey))
|
.map(|pubkey| (npub.to_string(), pubkey))
|
||||||
}
|
}
|
||||||
|
@ -172,8 +172,8 @@ fn real_posting_area(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
|
|||||||
ui.menu_button("@", |ui| {
|
ui.menu_button("@", |ui| {
|
||||||
for pair in pairs {
|
for pair in pairs {
|
||||||
if ui.button(pair.0).clicked() {
|
if ui.button(pair.0).clicked() {
|
||||||
if !app.draft.ends_with(" ") {
|
if !app.draft.ends_with(' ') {
|
||||||
app.draft.push_str(" ");
|
app.draft.push(' ');
|
||||||
}
|
}
|
||||||
app.draft.push_str(&pair.1.try_as_bech32_string().unwrap());
|
app.draft.push_str(&pair.1.try_as_bech32_string().unwrap());
|
||||||
app.tag_someone = "".to_owned();
|
app.tag_someone = "".to_owned();
|
||||||
|
Loading…
Reference in New Issue
Block a user