Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Bump rust toolchain to 1.83 #39

Merged
merged 5 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
ColinKinloch marked this conversation as resolved.
Show resolved Hide resolved
with:
toolchain: "1.83"
- run: cargo check --all-targets --all-features

fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.70
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.83"
components: rustfmt
- run: cargo fmt --all --check

Expand All @@ -34,16 +37,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/[email protected]
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.83"
- run: cargo test --all-targets --all-features

clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.70
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
with:
toolchain: "1.83"
components: clippy
- run: cargo clippy --all-targets --all-features -- -D warnings

Expand Down
3 changes: 2 additions & 1 deletion src/dsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::marker::PhantomData;
#[derive(Debug)]
pub struct FileEntry {
pub hash: String,
#[allow(dead_code)]
pub size: usize,
pub filename: String,
}
Expand All @@ -18,7 +19,7 @@ impl<'de> Deserialize<'de> for FileEntry {
{
struct FileEntryVisitor;

impl<'de> Visitor<'de> for FileEntryVisitor {
impl Visitor<'_> for FileEntryVisitor {
type Value = FileEntry;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
7 changes: 3 additions & 4 deletions src/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ const INITIAL_INTERVAL: Duration = Duration::from_millis(300);
fn is_client_error(err: &(dyn std::error::Error + 'static)) -> bool {
err.downcast_ref::<reqwest::Error>()
.and_then(|e| e.status())
.map_or(false, |status| status.is_client_error())
.is_some_and(|status| status.is_client_error())
|| err
.downcast_ref::<obs::Error>()
.map_or(false, |err| matches!(err, obs::Error::ApiError(_)))
.is_some_and(|err| matches!(err, obs::Error::ApiError(_)))
}

fn is_caused_by_client_error(report: &Report) -> bool {
Expand All @@ -26,8 +26,7 @@ fn is_caused_by_client_error(report: &Report) -> bool {
// source()), so we need to examine that error directly.
|| err
.downcast_ref::<std::io::Error>()
.and_then(|err| err.get_ref())
.map_or(false, |err| is_client_error(err))
.and_then(|err| err.get_ref()).is_some_and(|err| is_client_error(err))
})
}

Expand Down
2 changes: 1 addition & 1 deletion src/upload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ pub struct ObsDscUploader {
}

impl ObsDscUploader {
pub async fn prepare<'a>(
pub async fn prepare(
client: obs::Client,
mut project: String,
branch_to: Option<String>,
Expand Down
Loading