Skip to content

Commit

Permalink
Add typos.toml and fix typos (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
iyangsj authored Dec 13, 2023
1 parent 8672b86 commit 9db9d90
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ jobs:
run: rustup update
- name: Code format check
run: cargo fmt --check
- name: Code spell check
run: |
cargo install typos-cli
typos -c ./typos.toml
- name: Code lint check
run: cargo clippy --all -- -D warnings

Expand Down
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add quic_conn_index() for getting connection index
- tquic_client: create the output directory if it does not exist
- tquic_client: convert unspecified address to localhost address
- tquic_client: prompt help messages for wrong command args -
- tquic_client: prompt help messages for wrong command args
- tquic_client: print statistics at the end of execution
- Improve unit testing
- Improve static analysis

### Changed
- endpoint: change Endpoint.close() to support forcily close the endpint
- endpoint: change Endpoint.close() to support forcily close the endpoint
- endpoint: quic_endpoint_new() no longer takes ownership of the resources provides by the C caller
- tquic_client: change `-p` option to write the response header and body to stdout

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ pub type Result<T> = std::result::Result<T, Error>;
pub struct ConnectionId {
/// length of cid
len: u8,
/// octects of cid
/// octets of cid
data: [u8; MAX_CID_LEN],
}

Expand Down
4 changes: 2 additions & 2 deletions src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ impl PacketHeader {
///
/// The Length/Packet Number field are intentionally not written to the
/// buffer for the moment.
/// See RFC 9002 Section 17 Packet Fromats
/// See RFC 9002 Section 17 Packet Formats
pub fn to_bytes(&self, mut buf: &mut [u8]) -> Result<usize> {
let len = buf.len();

Expand Down Expand Up @@ -267,7 +267,7 @@ impl PacketHeader {
/// The Length/Packet Number field in packet header are intentionally not
/// read from the buffer for the moment.
///
/// See RFC 9002 Section 17 Packet Fromats
/// See RFC 9002 Section 17 Packet Formats
pub fn from_bytes(mut buf: &[u8], dcid_len: usize) -> Result<(PacketHeader, usize)> {
let len = buf.len();
let first = buf.read_u8()?;
Expand Down
2 changes: 1 addition & 1 deletion src/qlog/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ impl EventImportance {
/// The "time" field indicates the timestamp at which the event occurred.
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq, Debug)]
pub enum TimeFormat {
/// Iclude the full absolute timestamp with each event. This approach uses
/// Include the full absolute timestamp with each event. This approach uses
/// the largest amount of characters.
Absolute,

Expand Down
2 changes: 1 addition & 1 deletion src/ranges.rs
Original file line number Diff line number Diff line change
Expand Up @@ -948,7 +948,7 @@ mod tests {
// Insert range [0, 1), only one elem.
r.insert(0..1);
assert_eq!(r.len(), 1);
// Tranverse the range from both directions.
// Traverse the range from both directions.
assert_eq!(&r.flatten().collect::<Vec<u64>>(), &[0]);
assert_eq!(&r.flatten().rev().collect::<Vec<u64>>(), &[0]);

Expand Down
24 changes: 24 additions & 0 deletions typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[default]
binary = false
check-filename = true

[default.extend-identifiers]
referes = "referes"
StatuS = "StatuS"

[default.extend-words]
# ECN Capable Transport
ect = "ect"

[files]
extend-exclude = [
"*.snap",
"*.bin",
"*.der",
"*.pem",
"LICENSE",
"**/website/**/*",
"**/target/**/*",
"**/deps/**/*",
"**/corpus/**/*",
]

0 comments on commit 9db9d90

Please sign in to comment.