Skip to content

Commit

Permalink
Merge branch 'master' into feat/issue-3220-connection-header-precedence
Browse files Browse the repository at this point in the history
  • Loading branch information
jonatansalemes committed May 9, 2024
2 parents b953dd6 + c1a6388 commit 1a06974
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 20 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci-post-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
toolchain: ${{ matrix.version.version }}

- name: Install cargo-hack and cargo-ci-cache-clean
uses: taiki-e/install-action@v2.32.17
uses: taiki-e/install-action@v2.33.16
with:
tool: cargo-hack,cargo-ci-cache-clean

Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0

- name: Install cargo-hack
uses: taiki-e/install-action@v2.32.17
uses: taiki-e/install-action@v2.33.16
with:
tool: cargo-hack

Expand All @@ -109,7 +109,7 @@ jobs:
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0

- name: Install nextest
uses: taiki-e/install-action@v2.32.17
uses: taiki-e/install-action@v2.33.16
with:
tool: nextest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
toolchain: ${{ matrix.version.version }}

- name: Install cargo-hack and cargo-ci-cache-clean
uses: taiki-e/install-action@v2.32.17
uses: taiki-e/install-action@v2.33.16
with:
tool: cargo-hack,cargo-ci-cache-clean

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
components: llvm-tools-preview

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2.32.17
uses: taiki-e/install-action@v2.33.16
with:
tool: cargo-llvm-cov

- name: Generate code coverage
run: cargo llvm-cov --workspace --all-features --codecov --output-path codecov.json

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.3.0
uses: codecov/codecov-action@v4.3.1
with:
files: codecov.json
fail_ci_if_error: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ jobs:
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1.8.0
with:
toolchain: nightly-2023-08-25
toolchain: nightly-2024-04-26

- name: Install cargo-public-api
uses: taiki-e/install-action@v2.32.17
uses: taiki-e/install-action@v2.33.16
with:
tool: cargo-public-api

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upload-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: echo '<meta http-equiv="refresh" content="0;url=actix_web/index.html">' > target/doc/index.html

- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.5.0
uses: JamesIves/github-pages-deploy-action@v4.6.0
with:
folder: target/doc
single-commit: true
2 changes: 1 addition & 1 deletion actix-http/src/h1/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ where

req.head_mut().peer_addr = *this.peer_addr;

req.conn_data = this.conn_data.clone();
req.conn_data.clone_from(this.conn_data);

match this.codec.message_type() {
// request has no payload
Expand Down
2 changes: 1 addition & 1 deletion actix-http/src/h2/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ where
head.headers = parts.headers.into();
head.peer_addr = this.peer_addr;

req.conn_data = this.conn_data.clone();
req.conn_data.clone_from(&this.conn_data);

let fut = this.flow.service.call(req);
let config = this.config.clone();
Expand Down
3 changes: 2 additions & 1 deletion actix-multipart/src/form/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,8 @@ where
let entry = field_limits
.entry(field.name().to_owned())
.or_insert_with(|| T::limit(field.name()));
limits.field_limit_remaining = entry.to_owned();

limits.field_limit_remaining.clone_from(entry);

T::handle_field(&req, field, &mut limits, &mut state).await?;

Expand Down
8 changes: 2 additions & 6 deletions actix-router/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,11 @@ impl<T: ResourcePath> Path<T> {
None
}

/// Get matched parameter by name.
/// Returns matched parameter by name.
///
/// If keyed parameter is not available empty string is used as default value.
pub fn query(&self, key: &str) -> &str {
if let Some(s) = self.get(key) {
s
} else {
""
}
self.get(key).unwrap_or_default()
}

/// Return iterator to items in parameter container.
Expand Down
2 changes: 1 addition & 1 deletion actix-web/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl AppConfig {

#[cfg(test)]
pub(crate) fn set_host(&mut self, host: &str) {
self.host = host.to_owned();
host.clone_into(&mut self.host);
}
}

Expand Down
2 changes: 1 addition & 1 deletion actix-web/src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ mod tests {
data3: web::Data<f64>| {
assert_eq!(**data1, 10);
assert_eq!(**data2, '*');
let error = std::f64::EPSILON;
let error = f64::EPSILON;
assert!((**data3 - 1.0).abs() < error);
HttpResponse::Ok()
},
Expand Down

0 comments on commit 1a06974

Please sign in to comment.