Skip to content

Commit 76ded20

Browse files
authored
Edition bump and update to dependencies (#222)
* Bump all dependencies and use 2024 edition * Use MiiData fields and bindgen functions * Elided lifetime warning fix * Formatting * Update examples to work with latest edition * Fix clippy lints * Revert ferris_says version and update upload_artifacts version * Add new blocklist rules for layout tests * Fix clippy annotations
1 parent 2b2e0ed commit 76ded20

File tree

19 files changed

+135
-212
lines changed

19 files changed

+135
-212
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
matrix:
1616
toolchain:
1717
# Run against a "known good" nightly. Rustc version is 1 day behind the toolchain date
18-
- nightly-2025-03-30
18+
- nightly-2025-07-25
1919
# Check for breakage on latest nightly
2020
- nightly
2121

@@ -54,7 +54,7 @@ jobs:
5454
strategy:
5555
matrix:
5656
toolchain:
57-
- nightly-2025-03-30
57+
- nightly-2025-07-25
5858
- nightly
5959
continue-on-error: ${{ matrix.toolchain == 'nightly' }}
6060
runs-on: ubuntu-latest
@@ -93,7 +93,7 @@ jobs:
9393
args: --doc --workspace
9494

9595
- name: Upload citra logs and capture videos
96-
uses: actions/upload-artifact@v3
96+
uses: actions/upload-artifact@v4
9797
if: success() || failure() # always run unless the workflow was cancelled
9898
with:
9999
name: citra-logs-${{ matrix.toolchain }}

.github/workflows/docs.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
- uses: rust3ds/test-runner/setup@v1
2424
with:
25-
toolchain: nightly-2024-02-18
25+
toolchain: nightly-2025-07-25
2626

2727
- name: Build workspace docs
2828
run: cargo 3ds --verbose doc --verbose --no-deps --workspace
@@ -59,4 +59,3 @@ jobs:
5959
- name: Deploy to GitHub Pages
6060
id: deployment
6161
uses: actions/deploy-pages@v2
62-

ctru-rs/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ categories = ["os", "api-bindings", "hardware-support"]
1010
exclude = ["examples"]
1111
license = "Zlib"
1212
edition = "2024"
13-
rust-version = "1.85"
13+
rust-version = "1.88"
1414

1515
[lib]
1616
crate-type = ["rlib"]
@@ -27,7 +27,7 @@ macaddr = "1.0.1"
2727
widestring = "1.1.0"
2828

2929
[build-dependencies]
30-
toml = "0.5"
30+
toml = "0.9.4"
3131

3232
[dev-dependencies]
3333
bytemuck = "1.12.3"

ctru-rs/examples/file-explorer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl<'a> FileExplorer<'a> {
119119
println!("{i:2} - {}", entry.file_name().to_string_lossy());
120120
self.entries.push(entry);
121121

122-
if (i + 1) % 20 == 0 {
122+
if (i + 1).is_multiple_of(20) {
123123
self.wait_for_page_down();
124124
}
125125
}

ctru-rs/examples/ir-user-circle-pad-pro.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,9 @@ impl<'screen> CirclePadProDemo<'screen> {
147147
if let Err(e) = self
148148
.connection_status_event
149149
.wait_for_event(Duration::from_millis(100))
150+
&& !e.is_timeout()
150151
{
151-
if !e.is_timeout() {
152-
panic!("Couldn't initialize circle pad pro connection: {e}");
153-
}
152+
panic!("Couldn't initialize circle pad pro connection: {e}");
154153
}
155154

156155
self.print_status_info();
@@ -168,10 +167,9 @@ impl<'screen> CirclePadProDemo<'screen> {
168167
if let Err(e) = self
169168
.connection_status_event
170169
.wait_for_event(Duration::from_millis(100))
170+
&& !e.is_timeout()
171171
{
172-
if !e.is_timeout() {
173-
panic!("Couldn't initialize circle pad pro connection: {e}");
174-
}
172+
panic!("Couldn't initialize circle pad pro connection: {e}");
175173
}
176174
}
177175

@@ -225,7 +223,7 @@ impl<'screen> CirclePadProDemo<'screen> {
225223
// Write data to top screen
226224
self.top_console.select();
227225
self.top_console.clear();
228-
println!("{:x?}", status_info);
226+
println!("{status_info:x?}");
229227

230228
self.ir_user.process_shared_memory(|ir_mem| {
231229
println!("\nReceiveBufferInfo:");

ctru-rs/examples/local-networking.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ fn main() -> Result<(), Error> {
156156
}
157157
State::Connect => {
158158
let appdata = uds.network_appdata(&networks[selected_network], None)?;
159-
println!("App data: {:02X?}", appdata);
159+
println!("App data: {appdata:02X?}");
160160

161161
if let Err(e) = uds.connect_network(
162162
&networks[selected_network],
@@ -170,10 +170,10 @@ fn main() -> Result<(), Error> {
170170
println!("Press A to start scanning or B to create a new network");
171171
} else {
172172
channel = uds.channel()?;
173-
println!("Connected using channel {}", channel);
173+
println!("Connected using channel {channel}");
174174

175175
let appdata = uds.appdata(None)?;
176-
println!("App data: {:02X?}", appdata);
176+
println!("App data: {appdata:02X?}");
177177

178178
if uds.wait_status_event(false, false)? {
179179
prev_node_mask = handle_status_event(&uds, prev_node_mask)?;

ctru-rs/examples/title-info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,11 @@ fn main() {
9797
if use_nand {
9898
println!("Press SELECT to choose SD Card");
9999
println!("Current medium: NAND");
100-
println!("Title count: {}", nand_count);
100+
println!("Title count: {nand_count}");
101101
} else {
102102
println!("Press SELECT to choose NAND");
103103
println!("Current medium: SD Card");
104-
println!("Title count: {}", sd_count);
104+
println!("Title count: {sd_count}");
105105
}
106106

107107
refresh = false;

0 commit comments

Comments
 (0)