chore: update dependencies 30.05.2025 and MSRV to 1.82.0 (#546)

* chore: update dependencies 30.05.2025
* chore: format and lint checks for test files on CI
* fix: clippy lint warnings in test files
This commit is contained in:
Jose Quintana
2025-05-31 23:31:50 +02:00
committed by GitHub
parent 89f5846ffa
commit b56e3c4a96
6 changed files with 297 additions and 275 deletions

View File

@@ -8,7 +8,7 @@ freebsd_instance:
task:
only_if: $CIRRUS_TAG == '' && changesIncludeOnly('.cirrus.yml', 'src/**', 'tests/**', 'Cargo.toml', 'Cargo.lock', '.cargo/config.toml')
env:
TOOLCHAIN: "1.81.0"
TOOLCHAIN: "1.82.0"
RUSTFLAGS: -Dwarnings --cfg tokio_unstable
CARGO_FEATURES: "--features=all"
RUST_BACKTRACE: "1"
@@ -45,7 +45,7 @@ task:
task:
only_if: $CIRRUS_TAG != ''
env:
TOOLCHAIN: "1.81.0"
TOOLCHAIN: "1.82.0"
RUSTFLAGS: -Dwarnings --cfg tokio_unstable
CARGO_FEATURES: "--features=all"
GITHUB_TOKEN: ENCRYPTED[d1766ef328d83729917d2ffb875d64c35d1c0177edf8f32e66ec464daf5c1b7b145d65fc6c044a73fffe2235d3b38349]

View File

@@ -74,7 +74,7 @@ jobs:
# We test against the latest and minimum Rust stable version.
- build: pinned
os: ubuntu-22.04
rust: 1.81.0
rust: 1.82.0
# Some of our release builds are generated by a nightly compiler to take
# advantage of the latest optimizations/compile time improvements.
- build: linux-musl
@@ -319,11 +319,12 @@ jobs:
- name: Check formatting
run: |
cargo fmt --all -- --check
cargo fmt --all -- --check tests/*.rs
- name: Check via Clippy
run: |
cargo clippy --all-features -- -D warnings
cargo clippy --all-features --tests -- -D warnings
- name: Check crate docs
run: |

533
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
name = "static-web-server"
version = "2.36.1"
edition = "2021"
rust-version = "1.81.0"
rust-version = "1.82.0"
authors = ["Jose Quintana <https://joseluisq.net>"]
license = "MIT OR Apache-2.0"
description = "A cross-platform, high-performance and asynchronous web server for static files-serving."
@@ -110,7 +110,7 @@ tokio-metrics-collector = { version = "0.3.1", optional = true }
prometheus = { version = "0.14.0", default-features = false, optional = true }
[target.'cfg(windows)'.dependencies]
windows-service = "0.7"
windows-service = "0.8"
[dev-dependencies]
bytes = "1.10"

View File

@@ -6,7 +6,7 @@ Follow these instructions to either build **`SWS`** project from the source or t
If you want to build **SWS** from the source, all you need is a [Rust 2021 Edition](https://blog.rust-lang.org/2021/05/11/edition-2021.html) installed.
So make sure to install Rust [1.81.0](https://blog.rust-lang.org/2024/09/05/Rust-1.81.0/) or newer (or nightly) along with [the toolchain(s)](https://rust-lang.github.io/rustup/concepts/toolchains.html) of your preference.
So make sure to install Rust [1.82.0](https://blog.rust-lang.org/2024/10/17/Rust-1.82.0/) or newer (or nightly) along with [the toolchain(s)](https://rust-lang.github.io/rustup/concepts/toolchains.html) of your preference.
Then clone the repository and use [Cargo](https://doc.rust-lang.org/cargo/) to build the project from the source.

View File

@@ -140,7 +140,7 @@ mod tests {
ignore_hidden_files: false,
disable_symlinks,
index_files: &[],
dir_listing_download: &vec![DirDownloadFmt::Targz],
dir_listing_download: &[DirDownloadFmt::Targz],
})
.await
{
@@ -179,7 +179,7 @@ mod tests {
assert_eq!(left, right);
} else {
assert!(body.len() == 0);
assert!(body.is_empty());
}
}
Err(status) => {
@@ -210,7 +210,7 @@ mod tests {
ignore_hidden_files: true,
disable_symlinks: false,
index_files: &[],
dir_listing_download: &vec![DirDownloadFmt::Targz],
dir_listing_download: &[DirDownloadFmt::Targz],
})
.await
{
@@ -230,13 +230,12 @@ mod tests {
if method == Method::GET {
let mut prefix = base_path.clone();
prefix.pop();
assert!(inspect_tarball_content(prefix, &body, false)
assert!(!inspect_tarball_content(prefix, &body, false)
.await
.iter()
.find(|path| path.file_name().unwrap() == ".dotfile")
.is_none());
.any(|path| path.file_name().unwrap() == ".dotfile"));
} else {
assert!(body.len() == 0);
assert!(body.is_empty());
}
}
Err(status) => {
@@ -268,7 +267,7 @@ mod tests {
ignore_hidden_files: false,
disable_symlinks,
index_files: &[],
dir_listing_download: &vec![DirDownloadFmt::Targz],
dir_listing_download: &[DirDownloadFmt::Targz],
})
.await
{
@@ -307,7 +306,7 @@ mod tests {
assert_eq!(left, right);
} else {
assert!(body.len() == 0);
assert!(body.is_empty());
}
}
Err(status) => {
@@ -337,7 +336,7 @@ mod tests {
ignore_hidden_files: false,
disable_symlinks: false,
index_files: &[],
dir_listing_download: &vec![],
dir_listing_download: &[],
})
.await
{
@@ -345,11 +344,10 @@ mod tests {
let res = result.resp;
assert_eq!(res.status(), 200);
assert_eq!(res.headers()["content-type"], "text/html; charset=utf-8");
assert!(res
assert!(!res
.headers()
.iter()
.find(|(k, _v)| *k == "content-disposition")
.is_none());
.any(|(k, _v)| *k == "content-disposition"));
}
Err(status) => {
assert!(method != Method::GET && method != Method::HEAD);