@@ -190,7 +190,7 @@ impl DecksCache {
|
||||
&self.fallback_pubkey
|
||||
}
|
||||
|
||||
pub fn get_all_decks_mut(&mut self) -> ValuesMut<Pubkey, Decks> {
|
||||
pub fn get_all_decks_mut(&mut self) -> ValuesMut<'_, Pubkey, Decks> {
|
||||
self.account_to_decks.values_mut()
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ pub fn get_nostr_build_upload_url() -> Promise<Result<String, Error>> {
|
||||
get_upload_url_from_provider(NOSTR_BUILD_URL())
|
||||
}
|
||||
|
||||
fn create_nip98_note(seckey: &[u8; 32], upload_url: String, payload_hash: String) -> Note {
|
||||
fn create_nip98_note(seckey: &[u8; 32], upload_url: String, payload_hash: String) -> Note<'_> {
|
||||
NoteBuilder::new()
|
||||
.kind(27235)
|
||||
.start_tag()
|
||||
|
||||
@@ -960,7 +960,7 @@ pub fn render_nav(
|
||||
ctx.ndb,
|
||||
ctx.img_cache,
|
||||
get_active_columns_mut(ctx.i18n, ctx.accounts, &mut app.decks_cache),
|
||||
&[route.clone()],
|
||||
std::slice::from_ref(route),
|
||||
col,
|
||||
ctx.i18n,
|
||||
)
|
||||
|
||||
@@ -56,7 +56,7 @@ impl NewPost {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn to_note(&self, seckey: &[u8; 32]) -> Note {
|
||||
pub fn to_note(&self, seckey: &[u8; 32]) -> Note<'_> {
|
||||
let mut content = self.content.clone();
|
||||
append_urls(&mut content, &self.media);
|
||||
|
||||
@@ -77,7 +77,7 @@ impl NewPost {
|
||||
builder.sign(seckey).build().expect("note should be ok")
|
||||
}
|
||||
|
||||
pub fn to_reply(&self, seckey: &[u8; 32], replying_to: &Note) -> Note {
|
||||
pub fn to_reply(&self, seckey: &[u8; 32], replying_to: &Note) -> Note<'_> {
|
||||
let mut content = self.content.clone();
|
||||
append_urls(&mut content, &self.media);
|
||||
|
||||
@@ -157,7 +157,7 @@ impl NewPost {
|
||||
.expect("expected build to work")
|
||||
}
|
||||
|
||||
pub fn to_quote(&self, seckey: &[u8; 32], quoting: &Note) -> Note {
|
||||
pub fn to_quote(&self, seckey: &[u8; 32], quoting: &Note) -> Note<'_> {
|
||||
let mut new_content = format!(
|
||||
"{}\nnostr:{}",
|
||||
self.content,
|
||||
|
||||
@@ -15,7 +15,7 @@ impl SaveProfileChanges {
|
||||
pub fn new(kp: FullKeypair, state: ProfileState) -> Self {
|
||||
Self { kp, state }
|
||||
}
|
||||
pub fn to_note(&self) -> Note {
|
||||
pub fn to_note(&self) -> Note<'_> {
|
||||
let sec = &self.kp.secret_key.to_secret_bytes();
|
||||
add_client_tag(NoteBuilder::new())
|
||||
.kind(0)
|
||||
|
||||
@@ -532,7 +532,7 @@ impl TimelineKind {
|
||||
let contact_filter = contacts_filter(pk.bytes());
|
||||
|
||||
let results = ndb
|
||||
.query(txn, &[contact_filter.clone()], 1)
|
||||
.query(txn, std::slice::from_ref(&contact_filter), 1)
|
||||
.expect("contact query failed?");
|
||||
|
||||
let kind_fn = TimelineKind::last_per_pubkey;
|
||||
@@ -681,7 +681,7 @@ fn contact_filter_state(txn: &Transaction, ndb: &Ndb, pk: &Pubkey) -> FilterStat
|
||||
let contact_filter = contacts_filter(pk);
|
||||
|
||||
let results = ndb
|
||||
.query(txn, &[contact_filter.clone()], 1)
|
||||
.query(txn, std::slice::from_ref(&contact_filter), 1)
|
||||
.expect("contact query failed?");
|
||||
|
||||
if results.is_empty() {
|
||||
@@ -706,7 +706,7 @@ fn last_per_pubkey_filter_state(ndb: &Ndb, pk: &Pubkey) -> FilterState {
|
||||
|
||||
let txn = Transaction::new(ndb).expect("txn");
|
||||
let results = ndb
|
||||
.query(&txn, &[contact_filter.clone()], 1)
|
||||
.query(&txn, std::slice::from_ref(&contact_filter), 1)
|
||||
.expect("contact query failed?");
|
||||
|
||||
if results.is_empty() {
|
||||
|
||||
@@ -274,7 +274,7 @@ struct RelayInfo<'a> {
|
||||
pub status: RelayStatus,
|
||||
}
|
||||
|
||||
fn get_relay_infos(pool: &RelayPool) -> Vec<RelayInfo> {
|
||||
fn get_relay_infos(pool: &RelayPool) -> Vec<RelayInfo<'_>> {
|
||||
pool.relays
|
||||
.iter()
|
||||
.map(|relay| RelayInfo {
|
||||
|
||||
@@ -30,7 +30,7 @@ pub enum DefaultZapState<'a> {
|
||||
Valid(&'a Msats), // in milisats
|
||||
}
|
||||
|
||||
pub fn get_default_zap_state(default_zap: &mut DefaultZapMsats) -> DefaultZapState {
|
||||
pub fn get_default_zap_state(default_zap: &mut DefaultZapMsats) -> DefaultZapState<'_> {
|
||||
if default_zap.pending.is_rewriting {
|
||||
return DefaultZapState::Pending(&mut default_zap.pending);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user