Skip to content

Commit 311e9fb

Browse files
committed
chore: fix typos
1 parent c406e20 commit 311e9fb

File tree

22 files changed

+35
-35
lines changed

22 files changed

+35
-35
lines changed

iroh-blobs/src/downloader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ pub trait Dialer: Stream<Item = (NodeId, anyhow::Result<Self::Connection>)> + Un
8787
pub enum FailureAction {
8888
/// The request was cancelled by us.
8989
AllIntentsDropped,
90-
/// An error ocurred that prevents the request from being retried at all.
90+
/// An error occurred that prevents the request from being retried at all.
9191
AbortRequest(anyhow::Error),
9292
/// An error occurred that suggests the node should not be used in general.
9393
DropPeer(anyhow::Error),

iroh-blobs/src/export.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub async fn export<D: BaoStore>(
3737
}
3838
}
3939

40-
/// Export all entries of a collection, recursively, to files on the local fileystem.
40+
/// Export all entries of a collection, recursively, to files on the local filesystem.
4141
pub async fn export_collection<D: BaoStore>(
4242
db: &D,
4343
hash: Hash,
@@ -55,7 +55,7 @@ pub async fn export_collection<D: BaoStore>(
5555
Ok(())
5656
}
5757

58-
/// Export a single blob to a file on the local fileystem.
58+
/// Export a single blob to a file on the local filesystem.
5959
pub async fn export_blob<D: BaoStore>(
6060
db: &D,
6161
hash: Hash,

iroh-blobs/src/store/bao_file.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl Default for BaoFileStorage {
275275
impl BaoFileStorage {
276276
/// Take the storage out, leaving an empty storage in its place.
277277
///
278-
/// Be careful to put somethign back in its place, or you will lose data.
278+
/// Be careful to put something back in its place, or you will lose data.
279279
#[cfg(feature = "fs-store")]
280280
pub fn take(&mut self) -> Self {
281281
std::mem::take(self)

iroh-blobs/src/store/traits.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ pub trait BaoBatchWriter {
131131
/// Write a batch of bao content items to the underlying storage.
132132
///
133133
/// The batch is guaranteed to be sorted as data is received from the network.
134-
/// So leafs will be sorted by offset, and parents will be sorted by pre order
134+
/// So leaves will be sorted by offset, and parents will be sorted by pre order
135135
/// traversal offset. There is no guarantee that they will be consecutive
136136
/// though.
137137
///

iroh-dns-server/examples/publish.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ async fn main() -> Result<()> {
5858
s
5959
}
6060
Err(_) => {
61-
bail!("Environtment variable IROH_SECRET is not set. To create a new secret, use the --create option.")
61+
bail!("Environment variable IROH_SECRET is not set. To create a new secret, use the --create option.")
6262
}
6363
};
6464

iroh-dns-server/src/http/doh/extract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub struct DnsQuery {
8080
/// Privacy setting for how your IP address is forwarded to authoritative nameservers
8181
#[allow(dead_code)]
8282
pub edns_client_subnet: Option<String>,
83-
/// Some url-safe random characters to pad your messages for privacy (to avoid being fingerprinted by encrytped message length)
83+
/// Some url-safe random characters to pad your messages for privacy (to avoid being fingerprinted by encrypted message length)
8484
#[allow(dead_code)]
8585
pub random_padding: Option<String>,
8686
/// Whether to provide answers for all records up to the root

iroh-docs/src/engine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ impl DefaultAuthorStorage {
379379
}
380380
}
381381

382-
/// Peristent default author for a docs engine.
382+
/// Persistent default author for a docs engine.
383383
#[derive(Debug)]
384384
pub struct DefaultAuthor {
385385
value: RwLock<AuthorId>,

iroh-docs/src/store/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ impl Store {
343343
})
344344
}
345345

346-
/// Delte an author.
346+
/// Delete an author.
347347
pub fn delete_author(&mut self, author: AuthorId) -> Result<()> {
348348
self.modify(|tables| {
349349
tables.authors.remove(author.as_bytes())?;
@@ -881,7 +881,7 @@ impl Iterator for ParentIterator {
881881
/// a database snapshot open until it is dropped.
882882
///
883883
/// Also, this represents a snapshot of the database at the time of creation.
884-
/// It nees a copy of a redb::ReadOnlyTable to be self-contained.
884+
/// It needs a copy of a redb::ReadOnlyTable to be self-contained.
885885
#[derive(derive_more::Debug)]
886886
pub struct ContentHashesIterator {
887887
#[debug(skip)]

iroh-gossip/examples/chat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ async fn main() -> anyhow::Result<()> {
9090
};
9191
println!("> our secret key: {secret_key}");
9292

93-
// confgure our relay map
93+
// configure our relay map
9494
let relay_mode = match (args.no_relay, args.relay) {
9595
(false, None) => RelayMode::Default,
9696
(false, Some(url)) => RelayMode::Custom(RelayMap::from_url(url)),

iroh-net/src/bin/iroh-relay.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ impl Default for Config {
182182
/// Defaults for fields from [`Config`].
183183
///
184184
/// These are the defaults that serde will fill in. Other defaults depends on each other
185-
/// and can not immediately be substituded by serde.
185+
/// and can not immediately be substituted by serde.
186186
mod cfg_defaults {
187187
pub(crate) fn enable_relay() -> bool {
188188
true

iroh-net/src/discovery.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ pub struct DiscoveryItem {
6060
///
6161
/// Must be microseconds since the unix epoch.
6262
pub last_updated: Option<u64>,
63-
/// The adress info for the node being resolved.
63+
/// The address info for the node being resolved.
6464
pub addr_info: AddrInfo,
6565
}
6666

iroh-net/src/discovery/pkarr_publish.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,20 @@ struct PublisherService {
129129

130130
impl PublisherService {
131131
async fn run(self) {
132-
let mut failed_attemps = 0;
132+
let mut failed_attempts = 0;
133133
let republish = tokio::time::sleep(Duration::MAX);
134134
tokio::pin!(republish);
135135
loop {
136136
if let Some(info) = self.watcher.get() {
137137
if let Err(err) = self.publish_current(info).await {
138138
warn!(?err, url = %self.pkarr_client.pkarr_relay_url , "Failed to publish to pkarr");
139-
failed_attemps += 1;
139+
failed_attempts += 1;
140140
// Retry after increasing timeout
141141
republish
142142
.as_mut()
143-
.reset(Instant::now() + Duration::from_secs(failed_attemps));
143+
.reset(Instant::now() + Duration::from_secs(failed_attempts));
144144
} else {
145-
failed_attemps = 0;
145+
failed_attempts = 0;
146146
// Republish after fixed interval
147147
republish
148148
.as_mut()

iroh-net/src/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ impl Endpoint {
717717
///
718718
/// Then [`Endpoint`] stores some information about all the other iroh-net nodes it has
719719
/// information about. This includes information about the relay server in use, any
720-
/// known direct addresses, when there was last any conact with this node and what kind
720+
/// known direct addresses, when there was last any contact with this node and what kind
721721
/// of connection this was.
722722
pub fn connection_info(&self, node_id: NodeId) -> Option<ConnectionInfo> {
723723
self.msock.connection_info(node_id)
@@ -1038,7 +1038,7 @@ fn try_send_rtt_msg(conn: &quinn::Connection, magic_ep: &Endpoint) {
10381038
}
10391039
}
10401040

1041-
/// Read a proxy url from the environemnt, in this order
1041+
/// Read a proxy url from the environment, in this order
10421042
///
10431043
/// - `HTTP_PROXY`
10441044
/// - `http_proxy`

iroh-net/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
//!
9999
//! The [`DnsDiscovery`] service is a discovery service which will publish the [`RelayUrl`]
100100
//! and direct addresses to a service publishing those as DNS records. To connect it looks
101-
//! up the [`NodeId`] in the DNS system to find the adressing details. This enables
101+
//! up the [`NodeId`] in the DNS system to find the addressing details. This enables
102102
//! connecting using only the [`NodeId`] which is often more convenient and resilient.
103103
//!
104104
//!

iroh-net/src/magicsock.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,7 +1556,7 @@ impl Stream for DirectAddrsStream {
15561556
if discovered.is_empty() {
15571557
// When we start up we might initially have empty local endpoints as
15581558
// the magic socket has not yet figured this out. Later on this set
1559-
// should never be emtpy. However even if it was the magicsock
1559+
// should never be empty. However even if it was the magicsock
15601560
// would be in a state not very useable so skipping those events is
15611561
// probably fine.
15621562
// To make sure we install the right waker we loop rather than
@@ -2646,7 +2646,7 @@ pub enum DirectAddrType {
26462646
///
26472647
/// When possible an iroh-net node will perform STUN to discover which is the address
26482648
/// from which it sends data on the public internet. This can be different from locally
2649-
/// bound addresses when the node is on a local network wich performs NAT or similar.
2649+
/// bound addresses when the node is on a local network which performs NAT or similar.
26502650
Stun,
26512651
/// An address assigned by the router using port mapping.
26522652
///
@@ -2913,7 +2913,7 @@ mod tests {
29132913
// TODO: ensure panics in this function are reported ok
29142914
assert!(
29152915
stats.path.lost_packets < 10,
2916-
"[reciever] should not loose many packets",
2916+
"[receiver] should not loose many packets",
29172917
);
29182918

29192919
info!("close");
@@ -3494,7 +3494,7 @@ mod tests {
34943494
mk_transmit(b"hello world", Some(5)),
34953495
mk_transmit(b"!", None)
34963496
]),
3497-
mk_expected(["hello", " worl", "d", "!"])
3497+
mk_expected(["hello", " worl", "d", "!"]) // spellchecker:disable-line
34983498
);
34993499
// split that results in 1 packet
35003500
assert_eq!(

iroh-net/src/magicsock/node_map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl NodeMap {
238238
/// Returns a stream of [`ConnectionType`].
239239
///
240240
/// Sends the current [`ConnectionType`] whenever any changes to the
241-
/// connection type for `public_key` has occured.
241+
/// connection type for `public_key` has occurred.
242242
///
243243
/// # Errors
244244
///
@@ -472,7 +472,7 @@ impl NodeMapInner {
472472
/// Returns a stream of [`ConnectionType`].
473473
///
474474
/// Sends the current [`ConnectionType`] whenever any changes to the
475-
/// connection type for `public_key` has occured.
475+
/// connection type for `public_key` has occurred.
476476
///
477477
/// # Errors
478478
///

iroh-net/src/magicsock/node_map/node_state.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ impl NodeState {
726726
best_addr::State::Empty | best_addr::State::Outdated(_)
727727
) {
728728
// We also need to send a ping to make this path available to us as well. This
729-
// is always sent togehter with a pong. So in the worst case the pong gets lost
729+
// is always sent together with a pong. So in the worst case the pong gets lost
730730
// and this ping does not. In that case we ping-pong until both sides have
731731
// received at least one pong. Once both sides have received one pong they both
732732
// have a best_addr and this ping will stop being sent.
@@ -934,7 +934,7 @@ impl NodeState {
934934
st.last_ping = None;
935935
if !call_me_maybe_ipps.contains(ipp) {
936936
// TODO: This seems like a weird way to signal that the endpoint no longer
937-
// thinks it has this IpPort as an avaialable path.
937+
// thinks it has this IpPort as an available path.
938938
if st.recent_pong.is_some() {
939939
debug!(path=?ipp ,"clearing recent pong");
940940
st.recent_pong = None;

iroh-net/src/netcheck/reportgen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1321,7 +1321,7 @@ mod tests {
13211321
// sudo sysctl net.ipv4.ping_group_range="1234 1234"
13221322
//
13231323
// Note that this does not survive a reboot usually, commonly you need to edit
1324-
// /etc/sysctl.conf or /etc/sysctl.d/* to persist this accross reboots.
1324+
// /etc/sysctl.conf or /etc/sysctl.d/* to persist this across reboots.
13251325
//
13261326
// TODO: Not sure what about IPv6 pings using sysctl.
13271327
#[tokio::test]

iroh-net/src/relay/codec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub(super) const PER_CLIENT_READ_QUEUE_DEPTH: usize = 512;
3131
/// ProtocolVersion is bumped whenever there's a wire-incompatible change.
3232
/// - version 1 (zero on wire): consistent box headers, in use by employee dev nodes a bit
3333
/// - version 2: received packets have src addrs in FrameType::RecvPacket at beginning
34-
/// NOTE: we are techincally running a modified version of the protocol.
34+
/// NOTE: we are technically running a modified version of the protocol.
3535
/// `FrameType::PeerPresent`, `FrameType::WatchConn`, `FrameType::ClosePeer`, have been removed.
3636
/// The server will error on that connection if a client sends one of these frames.
3737
/// We have split with the DERP protocol significantly starting with our relay protocol 3

iroh-net/src/util/chain.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! IO utilitiy to chain `AsyncRead`s together.
1+
//! IO utility to chain `AsyncRead`s together.
22
33
// Based on tokios chain implementation, that doesn't make the concrete type public.
44

iroh/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl<D: BaoStore> Node<D> {
141141
&self.inner.client
142142
}
143143

144-
/// Returns a referenc to the used `LocalPoolHandle`.
144+
/// Returns a reference to the used `LocalPoolHandle`.
145145
pub fn local_pool_handle(&self) -> &LocalPoolHandle {
146146
&self.inner.rt
147147
}

iroh/src/rpc_protocol.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl ServerStreamingMsg<RpcService> for BlobDownloadRequest {
112112
type Response = BlobDownloadResponse;
113113
}
114114

115-
/// Progress resposne for [`BlobDownloadRequest`]
115+
/// Progress response for [`BlobDownloadRequest`]
116116
#[derive(Debug, Clone, Serialize, Deserialize, derive_more::From, derive_more::Into)]
117117
pub struct BlobDownloadResponse(pub DownloadProgress);
118118

@@ -143,7 +143,7 @@ impl ServerStreamingMsg<RpcService> for BlobExportRequest {
143143
type Response = BlobExportResponse;
144144
}
145145

146-
/// Progress resposne for [`BlobExportRequest`]
146+
/// Progress response for [`BlobExportRequest`]
147147
#[derive(Debug, Clone, Serialize, Deserialize, derive_more::From, derive_more::Into)]
148148
pub struct BlobExportResponse(pub ExportProgress);
149149

@@ -953,7 +953,7 @@ pub struct BlobReadAtRequest {
953953
pub hash: Hash,
954954
/// Offset to start reading at
955955
pub offset: u64,
956-
/// Lenghth of the data to get
956+
/// Length of the data to get
957957
pub len: Option<usize>,
958958
}
959959

0 commit comments

Comments
 (0)