clippy and fmt

This commit is contained in:
Mike Dilger 2023-01-18 12:45:02 +13:00
parent d057ad67d1
commit 1d294204b4
3 changed files with 4 additions and 4 deletions

View File

@ -707,7 +707,7 @@ impl Overlord {
// 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 pubkey != event.pubkey {
add_pubkey_to_tags(&mut tags, pubkey.into());
add_pubkey_to_tags(&mut tags, pubkey);
}
}

View File

@ -7,7 +7,7 @@ pub fn keys_from_text(text: &str) -> Vec<(String, PublicKey)> {
if !npub.starts_with("npub1") {
None
} else {
PublicKey::try_from_bech32_string(&npub)
PublicKey::try_from_bech32_string(npub)
.ok()
.map(|pubkey| (npub.to_string(), pubkey))
}

View File

@ -172,8 +172,8 @@ fn real_posting_area(app: &mut GossipUi, ctx: &Context, frame: &mut eframe::Fram
ui.menu_button("@", |ui| {
for pair in pairs {
if ui.button(pair.0).clicked() {
if !app.draft.ends_with(" ") {
app.draft.push_str(" ");
if !app.draft.ends_with(' ') {
app.draft.push(' ');
}
app.draft.push_str(&pair.1.try_as_bech32_string().unwrap());
app.tag_someone = "".to_owned();