File tree Expand file tree Collapse file tree 7 files changed +20
-17
lines changed
Expand file tree Collapse file tree 7 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -81,11 +81,11 @@ jobs:
8181 - name : Clippy
8282 run : cargo clippy --all-targets --all-features
8383
84- - name : Lint
84+ - name : Check for Forbidden Words
8585 if : matrix.target == 'x86_64-apple-darwin'
8686 run : |
8787 brew install ripgrep
88- ./bin/lint
88+ ./bin/forbid
8989
9090 - name : Check Formatting
9191 run : cargo fmt --all -- --check
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euxo pipefail
4+
5+ which rg
6+
7+ ! rg \
8+ --glob ! bin/forbid \
9+ --glob ! CHANGELOG.md \
10+ --ignore-case \
11+ ' dbg!|fixme|todo|xxx'
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -38,8 +38,8 @@ clippy:
3838fmt :
3939 cargo + nightly fmt --all
4040
41- lint :
42- ./ bin/ lint
41+ forbid :
42+ ./ bin/ forbid
4343
4444preview-readme :
4545 grip -b README.md
6464check-minimal-versions :
6565 ./ bin/ check-minimal-versions
6666
67- check : test clippy lint check-minimal-versions gen
67+ check : test clippy forbid check-minimal-versions gen
6868 git diff --no-ext-diff --quiet --exit-code
6969 cargo + nightly fmt --all -- --check
7070
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ impl Message {
5151 //
5252 // where prefix is the network byte order encoding of `x + 1` into a u32.
5353 pub ( crate ) fn serialize ( & self ) -> Result < Vec < u8 > > {
54- // TODO: find a way to test this without blowing the stack.
54+ // find a way to test this without blowing the stack.
5555 let message_length = self . len ( ) . try_into ( ) . context ( error:: PeerMessagePayload ) ?;
5656 let mut buf: Vec < u8 > = u32:: to_be_bytes ( message_length) . to_vec ( ) ;
5757 buf. push ( self . flavour . into ( ) ) ;
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ mod tests {
7575 let mut msg = bendy:: serde:: ser:: to_bytes ( & req) . unwrap ( ) ;
7676 let benc = b"d8:msg_typei1e5:piecei1ee" ;
7777 assert_eq ! ( benc, & * msg) ;
78- msg. extend_from_slice ( b"piece data goes here xxxx ..." ) ;
78+ msg. extend_from_slice ( b"piece data goes here..." ) ;
7979 let req2 = bendy:: serde:: de:: from_bytes ( & msg) . unwrap ( ) ;
8080 assert_eq ! ( req, req2) ;
8181 }
Original file line number Diff line number Diff line change @@ -16,12 +16,12 @@ impl Client {
1616
1717 pub fn connect < A : ToSocketAddrs > ( address : A ) -> Result < Self > {
1818 let addrs = address
19- . to_socket_addrs ( ) // XXX: this may cause DNS look-ups!
19+ . to_socket_addrs ( ) // this may cause DNS look-ups!
2020 . context ( error:: TrackerSocketAddrs ) ?;
2121
2222 for tracker_addr in addrs {
2323 let Ok ( sock) = Self :: new_udp_socket ( tracker_addr) else {
24- continue ; // TODO: log these as warnings
24+ continue ; // log these as warnings
2525 } ;
2626 let mut client = Client {
2727 peer_id : rand:: thread_rng ( ) . gen ( ) ,
You can’t perform that action at this time.
0 commit comments