File tree Expand file tree Collapse file tree
pingora-core/src/protocols/http/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 strategy :
88 fail-fast : false
99 matrix :
10- # nightly, and latest stable
11- toolchain : [nightly, 1.82.0]
10+ # nightly, msrv, and latest stable
11+ toolchain : [nightly, 1.82.0, 1.87.0 ]
1212 runs-on : ubuntu-latest
1313 # Only run on "pull_request" event for external PRs. This is to avoid
1414 # duplicate builds for PRs created from internal branches.
3535 toolchain : ${{ matrix.toolchain }}
3636 components : rustfmt, clippy
3737
38- - name : Pin crates to versions for MSRV
39- run : |
40- [[ ${{ matrix.toolchain }} != 1.72.0 ]] || (cargo update -p boring --precise 4.13.0 && cargo update -p litemap --precise 0.7.4 && cargo update -p zerofrom --precise 0.1.5 && cargo update -p half --precise 2.4.1 && cargo update -p backtrace --precise 0.3.74)
41-
4238 - name : Run cargo fmt
4339 run : cargo fmt --all -- --check
4440
@@ -52,12 +48,12 @@ jobs:
5248
5349 - name : Run cargo clippy
5450 run : |
55- [[ ${{ matrix.toolchain }} != 1.82 .0 ]] || cargo clippy --all-targets --all -- --allow=unknown-lints --deny=warnings
51+ [[ ${{ matrix.toolchain }} != 1.87 .0 ]] || cargo clippy --all-targets --all -- --allow=unknown-lints --deny=warnings
5652
5753 - name : Run cargo audit
5854 run : |
59- [[ ${{ matrix.toolchain }} != 1.82 .0 ]] || (cargo install cargo-audit && cargo audit)
55+ [[ ${{ matrix.toolchain }} != 1.87 .0 ]] || (cargo install cargo-audit && cargo audit)
6056
6157 - name : Run cargo machete
6258 run : |
63- [[ ${{ matrix.toolchain }} != 1.82 .0 ]] || (cargo install cargo-machete --version 0.7.0 && cargo machete)
59+ [[ ${{ matrix.toolchain }} != 1.87 .0 ]] || (cargo install cargo-machete --version 0.7.0 && cargo machete)
Original file line number Diff line number Diff line change @@ -341,11 +341,7 @@ impl BodyReader {
341341 return Ok ( Some ( BufRef :: new ( 0 , existing_buf_end) ) ) ;
342342 }
343343 /* could be expecting DATA + CRLF or just CRLF */
344- let payload_size = if expecting_from_io > 2 {
345- expecting_from_io - 2
346- } else {
347- 0
348- } ;
344+ let payload_size = expecting_from_io. saturating_sub ( 2 ) ;
349345 /* expecting_from_io < existing_buf_end + 2 */
350346 if expecting_from_io >= existing_buf_end {
351347 self . body_state = self
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ pub fn ssl_set_verify_cert_store(
9494/// See [SSL_use_certificate](https://www.openssl.org/docs/man1.1.1/man3/SSL_use_certificate.html).
9595pub fn ssl_use_certificate ( ssl : & mut SslRef , cert : & X509Ref ) -> Result < ( ) , ErrorStack > {
9696 unsafe {
97- cvt ( SSL_use_certificate ( ssl. as_ptr ( ) as * mut SSL , cert. as_ptr ( ) as * mut X509 ) as c_long ) ?;
97+ cvt ( SSL_use_certificate ( ssl. as_ptr ( ) , cert. as_ptr ( ) ) as c_long ) ?;
9898 }
9999 Ok ( ( ) )
100100}
@@ -107,7 +107,7 @@ where
107107 T : HasPrivate ,
108108{
109109 unsafe {
110- cvt ( SSL_use_PrivateKey ( ssl. as_ptr ( ) as * mut SSL , key. as_ptr ( ) as * mut EVP_PKEY ) as c_long ) ?;
110+ cvt ( SSL_use_PrivateKey ( ssl. as_ptr ( ) , key. as_ptr ( ) ) as c_long ) ?;
111111 }
112112 Ok ( ( ) )
113113}
You can’t perform that action at this time.
0 commit comments