Skip to content

Commit 0ca439d

Browse files
authored
Fix typos to pass the CI. (#2177)
* Fix typos to pass the CI. Signed-off-by: ChenYing Kuo <evshary@gmail.com> * Fix the missing typos Signed-off-by: ChenYing Kuo <evshary@gmail.com> --------- Signed-off-by: ChenYing Kuo <evshary@gmail.com>
1 parent 66327c7 commit 0ca439d

File tree

16 files changed

+33
-31
lines changed

16 files changed

+33
-31
lines changed

_typos.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,7 @@ extend-exclude = [
88

99

1010
[default.extend-words]
11-
mis = "mis" # mismatch
12-
thr = "thr" # throughput
11+
Closee = "Closee" # Closee
12+
closee = "closee" # closee
13+
mis = "mis" # mismatch
14+
thr = "thr" # throughput

commons/zenoh-config/src/include.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ where
165165
}
166166
}
167167

168-
// if external file was incluided, add it's content to values
168+
// if external file was included, add it's content to values
169169
if let Some(mut include_values) = include_object {
170170
values.append(include_values.as_object_mut().unwrap());
171171
}

commons/zenoh-keyexpr/src/key_expr/format/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//! as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.htmll) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
2222
//!
2323
//! ## The format syntax
24-
//! KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formmats support "specification" chunks.
24+
//! KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formats support "specification" chunks.
2525
//! These chunks must follow the one of the following syntaxes: `${id:pattern}`, `${id:pattern#default}`, `$#{id:pattern}#`, or `$#{id:pattern#default}#`, where:
2626
//! - `id` is the chunk identifier: it cannot contain the `:` character, and is used to name the chunk in accessors.
2727
//! - `pattern` must be a valid KE (and therefore cannot contain `#`) and defines the range of values that the chunk may adopt.
@@ -71,7 +71,7 @@ use support::{IterativeConstructor, Spec};
7171
/// as the [`keformat`](https://docs.rs/zenoh/latest/zenoh/key_expr/format/macro.keformat.html) and [`kewrite`](https://docs.rs/zenoh/latest/zenoh/macro.kewrite.html) macros will be able to tell you if you're attempting to set fields of the format that do not exist.
7272
///
7373
/// ## The format syntax
74-
/// KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formmats support "specification" chunks.
74+
/// KE formats are defined following a syntax that extends the [`keyexpr`] syntax. In addition to existing chunk types, KE formats support "specification" chunks.
7575
/// These chunks must follow the one of the following syntaxes: `${id:pattern}`, `${id:pattern#default}`, `$#{id:pattern}#`, or `$#{id:pattern#default}#`, where:
7676
/// - `id` is the chunk identifier: it cannot contain the `:` character, and is used to name the chunk in accessors.
7777
/// - `pattern` must be a valid KE (and therefore cannot contain `#`) and defines the range of values that the chunk may adopt.

commons/zenoh-macros/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ impl AnnotableItem {
140140
#[proc_macro_attribute]
141141
/// Adds only piece of documentation about the item being unstable but no unstable attribute itself.
142142
/// This is useful when the whole crate is supposed to be used in unstable mode only, it makes sense
143-
/// to mention it in dcoumentation for the crate items, but not to add `#[cfg(feature = "unstable")]` to every item.
143+
/// to mention it in documentation for the crate items, but not to add `#[cfg(feature = "unstable")]` to every item.
144144
pub fn unstable_doc(_attr: TokenStream, tokens: TokenStream) -> TokenStream {
145145
let mut item = match parse_annotable_item!(tokens) {
146146
Ok(item) => item,

commons/zenoh-shm/src/header/chunk_header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use crate::api::provider::chunk::ChunkDescriptor;
2424
#[derive(Debug)]
2525
pub struct ChunkHeaderType {
2626
/*
27-
TODO: We don't really need 32 bits here, but access to 16-bit felds with 1 byte alignment is less performant on most of the platforms.
27+
TODO: We don't really need 32 bits here, but access to 16-bit fields with 1 byte alignment is less performant on most of the platforms.
2828
We need to bench and select reasonable integer sizes here once we have an implementation to bench
2929
*/
3030
pub refcount: AtomicU32,

io/zenoh-transport/src/common/seq_num.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub(crate) fn get_mask(resolution: Bits) -> TransportSn {
3535
///
3636
/// The [`SeqNum`][SeqNum] encapsulates the sequence numbers along with a
3737
/// the comparison operators that check whether two sequence numbers are
38-
/// less, equeal or greater of each other.
38+
/// less, equal or greater of each other.
3939
///
4040
#[derive(Clone, Copy, Debug)]
4141
pub(crate) struct SeqNum {

zenoh-ext/examples/examples/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
### z_advanced_pub
2020

2121
Declares an AdvancedPublisher with a given key expression.
22-
All the publications are locally cached (with a configurable history size - i.e. max number of cached data per resource, default 1). The cache can be queried by an AdvancedSubscriber for hsitory
22+
All the publications are locally cached (with a configurable history size - i.e. max number of cached data per resource, default 1). The cache can be queried by an AdvancedSubscriber for history
2323
or retransmission.
2424

2525
Typical usage:

zenoh-ext/src/querying_subscriber.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,24 +405,24 @@ where
405405
// and are considered as older than any sample with Timestamp.
406406
struct MergeQueue {
407407
untimestamped: VecDeque<Sample>,
408-
timstamped: BTreeMap<Timestamp, Sample>,
408+
timestamped: BTreeMap<Timestamp, Sample>,
409409
}
410410

411411
impl MergeQueue {
412412
fn new() -> Self {
413413
MergeQueue {
414414
untimestamped: VecDeque::new(),
415-
timstamped: BTreeMap::new(),
415+
timestamped: BTreeMap::new(),
416416
}
417417
}
418418

419419
fn len(&self) -> usize {
420-
self.untimestamped.len() + self.timstamped.len()
420+
self.untimestamped.len() + self.timestamped.len()
421421
}
422422

423423
fn push(&mut self, sample: Sample) {
424424
if let Some(ts) = sample.timestamp() {
425-
self.timstamped.entry(*ts).or_insert(sample);
425+
self.timestamped.entry(*ts).or_insert(sample);
426426
} else {
427427
self.untimestamped.push_back(sample);
428428
}
@@ -432,25 +432,25 @@ impl MergeQueue {
432432
let mut vec = VecDeque::new();
433433
let mut queue = BTreeMap::new();
434434
swap(&mut self.untimestamped, &mut vec);
435-
swap(&mut self.timstamped, &mut queue);
435+
swap(&mut self.timestamped, &mut queue);
436436
MergeQueueValues {
437437
untimestamped: vec,
438-
timstamped: queue.into_values(),
438+
timestamped: queue.into_values(),
439439
}
440440
}
441441
}
442442

443443
struct MergeQueueValues {
444444
untimestamped: VecDeque<Sample>,
445-
timstamped: btree_map::IntoValues<Timestamp, Sample>,
445+
timestamped: btree_map::IntoValues<Timestamp, Sample>,
446446
}
447447

448448
impl Iterator for MergeQueueValues {
449449
type Item = Sample;
450450
fn next(&mut self) -> Option<Self::Item> {
451451
self.untimestamped
452452
.pop_front()
453-
.or_else(|| self.timstamped.next())
453+
.or_else(|| self.timestamped.next())
454454
}
455455
}
456456

@@ -864,7 +864,7 @@ impl<Handler> FetchingSubscriber<Handler> {
864864

865865
// ensure the sample has a timestamp, thus it will always be sorted into the MergeQueue
866866
// after any timestamped Sample possibly coming from a fetch reply.
867-
let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().into(); // UNIX_EPOCH is Returns a Timespec::zero(), Unwrap Should be permissable here
867+
let now = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().into(); // UNIX_EPOCH is Returns a Timespec::zero(), Unwrap Should be permissible here
868868
let timestamp = s
869869
.timestamp()
870870
.cloned()

zenoh-ext/src/subscriber_ext.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ impl<'a, 'b, Handler> SubscriberBuilderExt<'a, 'b, Handler>
316316
/// through the callback function. Those samples will be merged with the received publications and made available in the receiver.
317317
/// Later on, new fetches can be performed again, calling [`FetchingSubscriber::fetch()`](super::FetchingSubscriber::fetch()).
318318
///
319-
/// A typical usage of the fetching liveliness subscriber is to retrieve existing liveliness tokens while susbcribing to
319+
/// A typical usage of the fetching liveliness subscriber is to retrieve existing liveliness tokens while subscribing to
320320
/// new liveness changes.
321321
///
322322
/// # Examples
@@ -375,7 +375,7 @@ impl<'a, 'b, Handler> SubscriberBuilderExt<'a, 'b, Handler>
375375
/// The results of the query will be merged with the received publications and made available in the receiver.
376376
/// Later on, new fetches can be performed again, calling [`FetchingSubscriber::fetch()`](super::FetchingSubscriber::fetch()).
377377
///
378-
/// A typical usage of the fetching liveliness subscriber is to retrieve existing liveliness tokens while susbcribing to
378+
/// A typical usage of the fetching liveliness subscriber is to retrieve existing liveliness tokens while subscribing to
379379
/// new liveness changes.
380380
///
381381
/// # Examples

zenoh/src/api/loader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ pub(crate) fn start_plugins(runtime: &Runtime) {
9393
Err(e) => {
9494
let report = match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| e.to_string())) {
9595
Ok(s) => s,
96-
Err(_) => panic!("Formatting the error from plugin {} ({:?}) failed, this is likely due to ABI unstability.\r\nMake sure your plugin was built with the same version of cargo as zenohd", plugin.name(), plugin.path()),
96+
Err(_) => panic!("Formatting the error from plugin {} ({:?}) failed, this is likely due to ABI instability.\r\nMake sure your plugin was built with the same version of cargo as zenohd", plugin.name(), plugin.path()),
9797
};
9898
if required {
9999
panic!(

0 commit comments

Comments
 (0)