cargo fmt

This commit is contained in:
Mike Dilger 2024-07-24 12:05:56 +12:00
parent 7342eec97d
commit b3fa22ada8
13 changed files with 19 additions and 23 deletions

View File

@ -1,6 +1,6 @@
use gossip_lib::{Error, ErrorKind, PersonList, PersonListMetadata, PersonTable, Table, GLOBALS};
use nostr_types::{
EncryptedPrivateKey, Event, NAddr, EventKind, Filter, Id, NostrBech32, NostrUrl, PreEvent,
EncryptedPrivateKey, Event, EventKind, Filter, Id, NAddr, NostrBech32, NostrUrl, PreEvent,
PrivateKey, PublicKey, RelayUrl, Tag, UncheckedUrl, Unixtime,
};
use std::collections::HashSet;

View File

@ -3,7 +3,7 @@ use gossip_lib::{Person, PersonList, PersonTable, Private, Table};
use std::collections::HashMap;
use nostr_types::{
ContentSegment, Event, NAddr, EventDelegation, EventKind, EventReference, Id, MilliSatoshi,
ContentSegment, Event, EventDelegation, EventKind, EventReference, Id, MilliSatoshi, NAddr,
NostrBech32, PublicKey, RelayUrl, ShatteredContent, Unixtime,
};

View File

@ -7,7 +7,7 @@ use egui::{Button, Color32, Pos2, RichText, Stroke, Ui};
use gossip_lib::comms::ToOverlordMessage;
use gossip_lib::FeedKind;
use gossip_lib::GLOBALS;
use nostr_types::{ContentSegment, NAddr, Id, IdHex, NostrBech32, PublicKey, Span, Url};
use nostr_types::{ContentSegment, Id, IdHex, NAddr, NostrBech32, PublicKey, Span, Url};
use std::{
cell::{Ref, RefCell},
rc::Rc,

View File

@ -20,8 +20,7 @@ use egui::{
use gossip_lib::comms::ToOverlordMessage;
use gossip_lib::{relay, DmChannel, FeedKind, ZapState, GLOBALS};
use nostr_types::{
Event, NAddr, EventDelegation, EventKind, NEvent, EventReference, IdHex, NostrUrl,
UncheckedUrl,
Event, EventDelegation, EventKind, EventReference, IdHex, NAddr, NEvent, NostrUrl, UncheckedUrl,
};
use serde::Serialize;
@ -1502,8 +1501,7 @@ fn note_actions(
kind: None,
};
ui.output_mut(|o| {
o.copied_text =
format!("https://njump.me/{}", nevent.as_bech32_string())
o.copied_text = format!("https://njump.me/{}", nevent.as_bech32_string())
});
}),
)));

View File

@ -4,8 +4,8 @@ use crate::nip46::{Approval, ParsedCommand};
use crate::people::PersonList;
use crate::relay::Relay;
use nostr_types::{
Event, NAddr, EventReference, Id, IdHex, Metadata, MilliSatoshi, Profile, PublicKey,
RelayUrl, Tag, UncheckedUrl, Unixtime,
Event, EventReference, Id, IdHex, Metadata, MilliSatoshi, NAddr, Profile, PublicKey, RelayUrl,
Tag, UncheckedUrl, Unixtime,
};
use std::fmt;
use std::hash::{Hash, Hasher};

View File

@ -6,7 +6,7 @@ use crate::error::{Error, ErrorKind};
use crate::globals::GLOBALS;
use crate::people::PersonList;
use dashmap::DashMap;
use nostr_types::{Event, NAddr, EventKind, EventReference, Filter, Id, Unixtime};
use nostr_types::{Event, EventKind, EventReference, Filter, Id, NAddr, Unixtime};
use parking_lot::RwLock;
use std::sync::atomic::{AtomicBool, Ordering};
use std::time::{Duration, Instant};

View File

@ -1,6 +1,6 @@
use crate::dm_channel::DmChannel;
use crate::globals::GLOBALS;
use nostr_types::{NAddr, EventKind, Filter, IdHex, PublicKey, PublicKeyHex, Tag, Unixtime};
use nostr_types::{EventKind, Filter, IdHex, NAddr, PublicKey, PublicKeyHex, Tag, Unixtime};
pub enum FeedRange {
// Long-term subscription for anything after the given time

View File

@ -19,7 +19,7 @@ use http::uri::{Parts, Scheme};
use http::Uri;
use mime::Mime;
use nostr_types::{
ClientMessage, NAddr, EventKind, EventReference, Filter, Id, IdHex, PreEvent, PublicKey,
ClientMessage, EventKind, EventReference, Filter, Id, IdHex, NAddr, PreEvent, PublicKey,
PublicKeyHex, RelayInformationDocument, RelayUrl, Tag, Unixtime,
};
use reqwest::Response;

View File

@ -22,9 +22,9 @@ use heed::RwTxn;
use http::StatusCode;
use minion::{Minion, MinionExitReason};
use nostr_types::{
EncryptedPrivateKey, Event, NAddr, EventKind, EventReference, Filter, Id, IdHex, Metadata,
MilliSatoshi, NostrBech32, PayRequestData, PreEvent, PrivateKey, Profile, PublicKey, RelayUrl,
RelayUsage, Tag, UncheckedUrl, Unixtime,
EncryptedPrivateKey, Event, EventKind, EventReference, Filter, Id, IdHex, Metadata,
MilliSatoshi, NAddr, NostrBech32, PayRequestData, PreEvent, PrivateKey, Profile, PublicKey,
RelayUrl, RelayUsage, Tag, UncheckedUrl, Unixtime,
};
use std::collections::HashMap;
use std::sync::atomic::Ordering;

View File

@ -4,8 +4,8 @@ use crate::globals::GLOBALS;
use crate::relay;
use crate::relay::Relay;
use nostr_types::{
ContentEncryptionAlgorithm, Event, NAddr, EventKind, EventReference, Id, NostrBech32,
PreEvent, PublicKey, RelayUrl, Tag, UncheckedUrl, Unixtime,
ContentEncryptionAlgorithm, Event, EventKind, EventReference, Id, NAddr, NostrBech32, PreEvent,
PublicKey, RelayUrl, Tag, UncheckedUrl, Unixtime,
};
use std::sync::mpsc;

View File

@ -9,7 +9,7 @@ use crate::relationship::{RelationshipByAddr, RelationshipById};
use crate::storage::{PersonTable, Table};
use heed::RwTxn;
use nostr_types::{
Event, NAddr, EventKind, EventReference, Filter, Id, Metadata, NostrBech32, PublicKey,
Event, EventKind, EventReference, Filter, Id, Metadata, NAddr, NostrBech32, PublicKey,
RelayList, RelayListUsage, RelayUrl, SimpleRelayList, Tag, Unixtime,
};
use std::sync::atomic::Ordering;
@ -383,9 +383,7 @@ pub fn process_new_event(
}
}
let _ = GLOBALS
.to_overlord
.send(ToOverlordMessage::FetchNAddr(ea));
let _ = GLOBALS.to_overlord.send(ToOverlordMessage::FetchNAddr(ea));
}
}
NostrBech32::Profile(prof) => {

View File

@ -62,7 +62,7 @@ use crate::relay::Relay;
use heed::types::{Bytes, Unit};
use heed::{Database, Env, EnvFlags, EnvOpenOptions, RoTxn, RwTxn};
use nostr_types::{
EncryptedPrivateKey, Event, NAddr, EventKind, EventReference, Filter, Id, MilliSatoshi,
EncryptedPrivateKey, Event, EventKind, EventReference, Filter, Id, MilliSatoshi, NAddr,
PublicKey, PublicKeyHex, RelayList, RelayListUsage, RelayUrl, Unixtime,
};
use paste::paste;

View File

@ -3,7 +3,7 @@ use crate::storage::types::RelationshipByAddr2;
use crate::storage::{RawDatabase, Storage};
use heed::RwTxn;
use heed::{types::Bytes, DatabaseFlags};
use nostr_types::{NAddr, Id};
use nostr_types::{Id, NAddr};
use speedy::{Readable, Writable};
use std::sync::Mutex;