File tree Expand file tree Collapse file tree 4 files changed +24
-5
lines changed
impit/src/response_parsing Expand file tree Collapse file tree 4 files changed +24
-5
lines changed Original file line number Diff line number Diff line change 1010 paths :
1111 - " impit-cli/**"
1212 - " impit/**"
13+ workflow_dispatch :
1314
1415env :
1516 CRATE_NAME : impit-cli
Original file line number Diff line number Diff line change 55 - master
66 pull_request :
77
8+ env :
9+ RUSTFLAGS : " --cfg reqwest_unstable"
10+
811jobs :
912 fmt :
10- name : Check code formatting
13+ name : rustfmt
1114 runs-on : ubuntu-latest
1215 steps :
1316 - uses : actions/checkout@v4
1720 components : rustfmt
1821
1922 - name : Rustfmt Check
20- uses : actions-rust-lang/rustfmt@v1
23+ uses : actions-rust-lang/rustfmt@v1
24+ clippy :
25+ name : clippy
26+ runs-on : ubuntu-latest
27+ steps :
28+ - uses : actions/checkout@v4
29+
30+ - uses : actions-rust-lang/setup-rust-toolchain@v1
31+ with :
32+ components : clippy
33+
34+ - name : Run clippy
35+ run : cargo clippy --all --manifest-path=./Cargo.toml -- -D warnings
Original file line number Diff line number Diff line change @@ -9,13 +9,16 @@ edition = "2021"
99clap = { version = " 4.5.21" , features = [" derive" ] }
1010impit = { path =" ../impit" }
1111tokio = { version =" 1.41.1" , features = [" full" ] }
12- aws-lc-rs = { version = " 1.11.1" , features = [ " bindgen " ] }
12+ aws-lc-rs = { version = " 1.11.1" }
1313
1414[target .x86_64-unknown-linux-musl .dependencies ]
1515openssl = { version = " *" , features = [" vendored" ] }
16+ aws-lc-rs = { version = " 1.11.1" features = [" bindgen" ] }
1617
1718[target .aarch64-unknown-linux-musl .dependencies ]
1819openssl = { version = " *" , features = [" vendored" ] }
20+ aws-lc-rs = { version = " 1.11.1" features = [" bindgen" ] }
1921
2022[target .arm-unknown-linux-musleabi .dependencies ]
2123openssl = { version = " *" , features = [" vendored" ] }
24+ aws-lc-rs = { version = " 1.11.1" features = [" bindgen" ] }
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ use encoding::Encoding;
44/// If the BOM sniffing algorithm fails, the function returns `None`.
55///
66/// See more details at https://encoding.spec.whatwg.org/#bom-sniff
7- fn bom_sniffing ( bytes : & Vec < u8 > ) -> Option < encoding:: EncodingRef > {
7+ fn bom_sniffing ( bytes : & [ u8 ] ) -> Option < encoding:: EncodingRef > {
88 if bytes. len ( ) < 3 {
99 return None ;
1010 }
@@ -27,7 +27,7 @@ fn bom_sniffing(bytes: &Vec<u8>) -> Option<encoding::EncodingRef> {
2727/// A lazy implementation of the BOM sniffing algorithm, using `scraper` to parse the HTML and extract the encoding.
2828///
2929/// See more details at https://html.spec.whatwg.org/#prescan-a-byte-stream-to-determine-its-encoding
30- fn prescan_bytestream ( bytes : & Vec < u8 > ) -> Option < encoding:: EncodingRef > {
30+ fn prescan_bytestream ( bytes : & [ u8 ] ) -> Option < encoding:: EncodingRef > {
3131 if bytes. len ( ) < 4 {
3232 return None ;
3333 }
You can’t perform that action at this time.
0 commit comments