mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 08:21:47 +00:00
cargo fmt
This commit is contained in:
parent
7342eec97d
commit
b3fa22ada8
@ -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;
|
||||
|
@ -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,
|
||||
};
|
||||
|
||||
|
@ -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,
|
||||
|
@ -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())
|
||||
});
|
||||
}),
|
||||
)));
|
||||
|
@ -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};
|
||||
|
@ -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};
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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) => {
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user