diff --git a/iroh-bytes/src/downloader/invariants.rs b/iroh-bytes/src/downloader/invariants.rs index f26c333707..ddbae471e4 100644 --- a/iroh-bytes/src/downloader/invariants.rs +++ b/iroh-bytes/src/downloader/invariants.rs @@ -111,7 +111,7 @@ impl, D: Dialer, S: Store> Service Arc { let mut prev_relay = None; if let Some(ref last) = self.reports.last { - prev_relay = last.preferred_relay.clone(); + prev_relay.clone_from(&last.preferred_relay); } let now = Instant::now(); const MAX_AGE: Duration = Duration::from_secs(5 * 60); diff --git a/iroh-net/src/relay/clients.rs b/iroh-net/src/relay/clients.rs index 47324a7d4f..796322bab6 100644 --- a/iroh-net/src/relay/clients.rs +++ b/iroh-net/src/relay/clients.rs @@ -329,7 +329,7 @@ mod tests { clients.unregister(&a_key.clone()); - assert!(clients.inner.get(&a_key).is_none()); + assert!(!clients.inner.contains_key(&a_key)); clients.shutdown().await; Ok(()) diff --git a/iroh-sync/src/store/fs/tables.rs b/iroh-sync/src/store/fs/tables.rs index 377659e4b3..f3f1f207a6 100644 --- a/iroh-sync/src/store/fs/tables.rs +++ b/iroh-sync/src/store/fs/tables.rs @@ -6,7 +6,7 @@ use std::time::Instant; use bytes::Bytes; use redb::{ MultimapTable, MultimapTableDefinition, ReadOnlyMultimapTable, ReadOnlyTable, ReadTransaction, - ReadableTable, Table, TableDefinition, WriteTransaction, + Table, TableDefinition, WriteTransaction, }; use crate::PeerIdBytes; @@ -73,20 +73,6 @@ pub type Nanos = u64; pub const DOWNLOAD_POLICY_TABLE: TableDefinition<&[u8; 32], &[u8]> = TableDefinition::new("download-policy-1"); -pub trait ReadableTables { - fn records(&self) -> impl ReadableTable, RecordsValue<'static>>; - fn records_by_key(&self) -> impl ReadableTable, ()>; - fn namespaces(&self) -> impl ReadableTable<&'static [u8; 32], (u8, &'static [u8; 32])>; - fn latest_per_author( - &self, - ) -> impl ReadableTable, LatestPerAuthorValue<'static>>; - // fn namespace_peers( - // &self, - // ) -> impl ReadableMultimapTable<&'static [u8; 32], (Nanos, &'static PeerIdBytes)>; - fn download_policy(&self) -> impl ReadableTable<&'static [u8; 32], &'static [u8]>; - fn authors(&self) -> impl ReadableTable<&'static [u8; 32], &'static [u8; 32]>; -} - self_cell::self_cell! { struct TransactionAndTablesInner { owner: WriteTransaction, diff --git a/iroh/src/node/builder.rs b/iroh/src/node/builder.rs index 564ca87f01..917395c511 100644 --- a/iroh/src/node/builder.rs +++ b/iroh/src/node/builder.rs @@ -42,7 +42,7 @@ use crate::{ use super::{rpc, Callbacks, EventCallback, Node, RpcStatus}; -pub const PROTOCOLS: [&[u8]; 3] = [&iroh_bytes::protocol::ALPN, GOSSIP_ALPN, SYNC_ALPN]; +pub const PROTOCOLS: [&[u8]; 3] = [iroh_bytes::protocol::ALPN, GOSSIP_ALPN, SYNC_ALPN]; /// Default bind address for the node. /// 11204 is "iroh" in leetspeak diff --git a/iroh/tests/gc.rs b/iroh/tests/gc.rs index a63f03d0c5..734306cc00 100644 --- a/iroh/tests/gc.rs +++ b/iroh/tests/gc.rs @@ -480,7 +480,6 @@ mod file { Ok(()) } - /// #[tokio::test] async fn gc_file_stress() -> Result<()> { let _ = tracing_subscriber::fmt::try_init();