Skip to content

Commit 1b2ae17

Browse files
authored
chore: bump to edition 2024 and rust 1.86 (#32)
2 parents 84560c1 + ee6b9d9 commit 1b2ae17

File tree

14 files changed

+257
-192
lines changed

14 files changed

+257
-192
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- uses: actions/checkout@v4
1919
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
2020
with:
21-
toolchain: "1.75"
21+
toolchain: "1.86"
2222
- run: cargo check --all-targets --all-features
2323

2424
fmt:
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
3030
with:
31-
toolchain: "1.75"
31+
toolchain: "1.86"
3232
components: rustfmt
3333
- run: cargo fmt --all --check
3434

@@ -39,7 +39,7 @@ jobs:
3939
- uses: actions/checkout@v4
4040
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
4141
with:
42-
toolchain: "1.75"
42+
toolchain: "1.86"
4343
- run: cargo test --all-targets --all-features
4444

4545
clippy:
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/checkout@v4
5050
- uses: dtolnay/rust-toolchain@master # avoid the tag here to prevent dependabot from updating it
5151
with:
52-
toolchain: "1.75"
52+
toolchain: "1.86"
5353
components: clippy
5454
- run: cargo clippy --all-targets --all-features -- -D warnings
5555

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[workspace]
2+
resolver = "3"
23
members = [
34
"oscrc",
45
"obsctl",

obsctl/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "obsctl"
33
version = "0.1.0"
44
authors = ["Sjoerd Simons <[email protected]>"]
5-
edition = "2018"
5+
edition = "2024"
66
license = "MIT OR Apache-2.0"
77

88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

obsctl/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use anyhow::{bail, Context, Result};
1+
use anyhow::{Context, Result, bail};
22
use clap::Parser;
33
use open_build_service_api::{Client, PackageCode, ResultListResult};
44
use oscrc::Oscrc;

open-build-service-api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "open-build-service-api"
33
version = "0.1.0"
44
authors = ["Sjoerd Simons <[email protected]>"]
5-
edition = "2018"
5+
edition = "2024"
66
license = "MIT OR Apache-2.0"
77

88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

open-build-service-api/examples/obsapi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async fn log(client: Client, opts: PackageFull) -> Result<()> {
5050
let log = p.log(&opts.repository, &opts.arch);
5151

5252
let (size, mtime) = log.entry().await?;
53-
println!("Log: size: {}, mtime: {}", size, mtime);
53+
println!("Log: size: {size}, mtime: {mtime}");
5454

5555
let mut stdout = tokio::io::stdout();
5656

open-build-service-api/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ use futures::ready;
55
use futures::stream::BoxStream;
66
use md5::{Digest, Md5};
77
use quick_xml::{de::DeError, events::Event};
8-
use reqwest::{header::CONTENT_TYPE, Body, Method, RequestBuilder, Response};
8+
use reqwest::{Body, Method, RequestBuilder, Response, header::CONTENT_TYPE};
99
use serde::de::IntoDeserializer;
10-
use serde::{de::DeserializeOwned, Deserialize, Serialize};
10+
use serde::{Deserialize, Serialize, de::DeserializeOwned};
1111
use std::collections::HashMap;
1212
use std::pin::Pin;
1313
use std::task::{Context, Poll};
@@ -577,7 +577,7 @@ impl<'a> PackageLogStream<'a> {
577577
let mut url = self.url.clone();
578578
url.query_pairs_mut()
579579
.append_pair("nostream", "1")
580-
.append_pair("start", &format!("{}", offset));
580+
.append_pair("start", &format!("{offset}"));
581581
if let Some(end) = self.options.end {
582582
url.query_pairs_mut().append_pair("end", &end.to_string());
583583
}

open-build-service-api/tests/integration.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ async fn test_commits() {
440440
assert_eq!(missing.entries[0].name, test_entry.name);
441441
assert_eq!(missing.entries[0].md5, test_entry.md5);
442442
} else {
443-
panic!("Expected missing entries, got {:?}", commit_result);
443+
panic!("Expected missing entries, got {commit_result:?}");
444444
}
445445

446446
package_1
@@ -462,7 +462,7 @@ async fn test_commits() {
462462
assert_eq!(directory.entries[0].name, test_entry.name);
463463
assert_eq!(directory.entries[0].md5, test_entry.md5);
464464
} else {
465-
panic!("Expected missing entries, got {:?}", commit_result);
465+
panic!("Expected missing entries, got {commit_result:?}");
466466
}
467467

468468
let directory = package_1.list(None).await.unwrap();
@@ -482,8 +482,8 @@ async fn test_branch() {
482482
let test_file = "test";
483483
let test_contents = b"some file contents here";
484484

485-
let test_project_branched_1 = format!("home:{}:branches:{}", DEFAULT_USERNAME, TEST_PROJECT);
486-
let test_project_branched_2 = format!("{}:branch", TEST_PROJECT);
485+
let test_project_branched_1 = format!("home:{DEFAULT_USERNAME}:branches:{TEST_PROJECT}");
486+
let test_project_branched_2 = format!("{TEST_PROJECT}:branch");
487487

488488
let mock = start_mock().await;
489489
mock.add_project(TEST_PROJECT.to_owned());

open-build-service-mock/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "open-build-service-mock"
33
version = "0.1.0"
44
authors = ["Sjoerd Simons <[email protected]>"]
5-
edition = "2018"
5+
edition = "2024"
66
license = "MIT OR Apache-2.0"
77

88
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

0 commit comments

Comments
 (0)