Skip to content

Commit 12482b9

Browse files
authored
use nightly-2025-11-16 (#660)
* use nightly-2025-11-16 Signed-off-by: Yuuki Takano <[email protected]> * clippy Signed-off-by: Yuuki Takano <[email protected]> * clippy Signed-off-by: Yuuki Takano <[email protected]> * clippy Signed-off-by: Yuuki Takano <[email protected]> * clippy Signed-off-by: Yuuki Takano <[email protected]> * add negation Signed-off-by: Yuuki Takano <[email protected]> --------- Signed-off-by: Yuuki Takano <[email protected]>
1 parent 32ff7bc commit 12482b9

File tree

40 files changed

+91
-117
lines changed

40 files changed

+91
-117
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
- uses: actions/checkout@v3
2020

2121
- name: Install Rust nightly
22-
run: rustup toolchain install nightly-2025-05-22
22+
run: rustup toolchain install nightly-2025-11-16
2323
- name: Use Rust nightly
24-
run: rustup default nightly-2025-05-22
24+
run: rustup default nightly-2025-11-16
2525
- name: Add Rust components
2626
run: rustup component add rust-src llvm-tools-preview clippy rustfmt
2727
- name: Add Rust targets

.vscode/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
// For AArch64 Virt
66
// "rust-analyzer.cargo.buildScripts.overrideCommand": [
77
// "cargo",
8-
// "+nightly-2025-05-22",
8+
// "+nightly-2025-11-16",
99
// "check_no_std",
1010
// "--target=targets/aarch64-kernel.json",
1111
// ],
1212
// "rust-analyzer.check.overrideCommand": [
1313
// "cargo",
14-
// "+nightly-2025-05-22",
14+
// "+nightly-2025-11-16",
1515
// "check_no_std",
1616
// "--target=targets/aarch64-kernel.json",
1717
// ],
@@ -21,13 +21,13 @@
2121
// For x86_64
2222
"rust-analyzer.cargo.buildScripts.overrideCommand": [
2323
"cargo",
24-
"+nightly-2025-05-22",
24+
"+nightly-2025-11-16",
2525
"check_no_std",
2626
"--target=targets/x86_64-kernel.json",
2727
],
2828
"rust-analyzer.check.overrideCommand": [
2929
"cargo",
30-
"+nightly-2025-05-22",
30+
"+nightly-2025-11-16",
3131
"check_no_std",
3232
"--target=targets/x86_64-kernel.json",
3333
],
@@ -37,14 +37,14 @@
3737
// For Linux
3838
// "rust-analyzer.cargo.buildScripts.overrideCommand": [
3939
// "cargo",
40-
// "+nightly-2025-05-22",
40+
// "+nightly-2025-11-16",
4141
// "check_std",
4242
// "--quiet",
4343
// "--message-format=json"
4444
// ],
4545
// "rust-analyzer.check.overrideCommand": [
4646
// "cargo",
47-
// "+nightly-2025-05-22",
47+
// "+nightly-2025-11-16",
4848
// "check_std",
4949
// "--quiet",
5050
// "--message-format=json"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ X86_64_LD=$(LINKERDIR)/x86_64-link.lds
5555
RV32_LD=$(LINKERDIR)/rv32-link.lds
5656
RV64_LD=$(LINKERDIR)/rv64-link.lds
5757

58-
RUSTV=nightly-2025-05-22
58+
RUSTV=nightly-2025-11-16
5959

6060
all: aarch64 x86_64 riscv32 riscv64 std
6161

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ It can execute async/await applications in kernel space safely.
99

1010
```text
1111
$ sudo apt install clang qemu-system-arm qemu-system-x86 qemu-system-misc python3-pyelftools
12-
$ rustup toolchain install nightly-2025-05-22
13-
$ rustup default nightly-2025-05-22
12+
$ rustup toolchain install nightly-2025-11-16
13+
$ rustup default nightly-2025-11-16
1414
$ rustup component add rust-src llvm-tools-preview
1515
$ rustup target add x86_64-unknown-none aarch64-unknown-none riscv64gc-unknown-none-elf riscv32imac-unknown-none-elf
1616
```

awkernel_async_lib/src/dag/graph.rs

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ where
525525
/// not borrow from the graph.
526526
///
527527
/// [1]: struct.Neighbors.html#method.detach
528-
pub fn neighbors(&self, a: NodeIndex<Ix>) -> Neighbors<E, Ix> {
528+
pub fn neighbors(&self, a: NodeIndex<Ix>) -> Neighbors<'_, E, Ix> {
529529
self.neighbors_directed(a, Outgoing)
530530
}
531531

@@ -546,7 +546,7 @@ where
546546
/// not borrow from the graph.
547547
///
548548
/// [1]: struct.Neighbors.html#method.detach
549-
pub fn neighbors_directed(&self, a: NodeIndex<Ix>, dir: Direction) -> Neighbors<E, Ix> {
549+
pub fn neighbors_directed(&self, a: NodeIndex<Ix>, dir: Direction) -> Neighbors<'_, E, Ix> {
550550
let mut iter = self.neighbors_undirected(a);
551551
let k = dir.index();
552552
iter.next[1 - k] = EdgeIndex::end();
@@ -567,7 +567,7 @@ where
567567
/// not borrow from the graph.
568568
///
569569
/// [1]: struct.Neighbors.html#method.detach
570-
pub fn neighbors_undirected(&self, a: NodeIndex<Ix>) -> Neighbors<E, Ix> {
570+
pub fn neighbors_undirected(&self, a: NodeIndex<Ix>) -> Neighbors<'_, E, Ix> {
571571
Neighbors {
572572
skip_start: a,
573573
edges: &self.edges,
@@ -589,7 +589,7 @@ where
589589
/// just the nodes without edges.
590590
///
591591
/// The whole iteration computes in **O(|V|)** time where V is the set of nodes.
592-
pub fn externals(&self, dir: Direction) -> Externals<N, Ix> {
592+
pub fn externals(&self, dir: Direction) -> Externals<'_, N, Ix> {
593593
Externals {
594594
iter: self.nodes.iter().enumerate(),
595595
dir,
@@ -607,7 +607,7 @@ where
607607
/// Create an iterator over all edges, in indexed order.
608608
///
609609
/// Iterator element type is `EdgeReference<E, Ix>`.
610-
pub fn edge_references(&self) -> EdgeReferences<E, Ix> {
610+
pub fn edge_references(&self) -> EdgeReferences<'_, E, Ix> {
611611
EdgeReferences {
612612
iter: self.edges.iter().enumerate(),
613613
}
@@ -691,29 +691,6 @@ where
691691
clone_fields!(Neighbors, skip_start, edges, next,);
692692
}
693693

694-
/// A “walker” object that can be used to step through the edge list of a node.
695-
///
696-
/// Created with [`.detach()`](struct.Neighbors.html#method.detach).
697-
///
698-
/// The walker does not borrow from the graph, so it lets you step through
699-
/// neighbors or incident edges while also mutating graph weights.
700-
pub struct WalkNeighbors<Ix> {
701-
skip_start: NodeIndex<Ix>,
702-
next: [EdgeIndex<Ix>; 2],
703-
}
704-
705-
impl<Ix> Clone for WalkNeighbors<Ix>
706-
where
707-
Ix: IndexType,
708-
{
709-
fn clone(&self) -> Self {
710-
WalkNeighbors {
711-
skip_start: self.skip_start,
712-
next: self.next,
713-
}
714-
}
715-
}
716-
717694
/// Iterator over the node indices of a graph.
718695
#[derive(Clone, Debug)]
719696
pub struct NodeIndices<Ix = DefaultIx> {

awkernel_async_lib/src/dag/graph/iter_format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ pub struct Format<'a, I> {
110110
}
111111

112112
pub trait IterFormatExt: Iterator {
113-
fn format(self, separator: &str) -> Format<Self>
113+
fn format(self, separator: &str) -> Format<'_, Self>
114114
where
115115
Self: Sized,
116116
{

awkernel_async_lib/src/dag/visit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ IntoEdgeReferences! {delegate_impl [] }
133133

134134
trait_template! {
135135
/// The graph’s `NodeId`s map to indices
136-
#[allow(clippy::needless_arbitrary_self_type)]
136+
#[allow(clippy::needless_arbitrary_self_type, dead_code)]
137137
pub trait NodeIndexable : GraphBase {
138138
@section self
139139
/// Return an upper bound of the node indices in the graph
@@ -150,7 +150,7 @@ NodeIndexable! {delegate_impl []}
150150

151151
trait_template! {
152152
/// A graph with a known node count.
153-
#[allow(clippy::needless_arbitrary_self_type)]
153+
#[allow(clippy::needless_arbitrary_self_type, dead_code)]
154154
pub trait NodeCount : GraphBase {
155155
@section self
156156
fn node_count(self: &Self) -> usize;
@@ -244,7 +244,7 @@ where
244244

245245
trait_template! {
246246
/// A graph that can create a map that tracks the visited status of its nodes.
247-
#[allow(clippy::needless_arbitrary_self_type)]
247+
#[allow(clippy::needless_arbitrary_self_type, dead_code)]
248248
pub trait Visitable : GraphBase {
249249
@section type
250250
/// The associated map type

awkernel_async_lib/src/time_interval.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ use core::{
4040
use futures::Stream;
4141
use futures::StreamExt;
4242

43-
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
43+
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
4444
#[allow(unused)]
4545
pub enum MissedTickBehavior {
4646
/// Ticks as fast as possible until caught up.
@@ -50,6 +50,7 @@ pub enum MissedTickBehavior {
5050
/// Expected ticks: | 1 | 2 | 3 | 4 | 5 | 6 |
5151
/// Actual ticks: | work -----| delay | work | work | work -| work -----|
5252
/// ```
53+
#[default]
5354
Burst,
5455

5556
/// Ticks at the next available interval after the delay.
@@ -71,12 +72,6 @@ pub enum MissedTickBehavior {
7172
Skip,
7273
}
7374

74-
impl Default for MissedTickBehavior {
75-
fn default() -> Self {
76-
Self::Burst
77-
}
78-
}
79-
8075
/// Creates a new interval that ticks at the specified `period`.
8176
/// The first tick completes immediately.
8277
///

awkernel_async_lib_verified/src/ringq.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ impl<T> RingQ<T> {
8787

8888
/// Get a iterator.
8989
#[inline(always)]
90-
pub fn iter(&self) -> IterRingQ<T> {
90+
pub fn iter(&self) -> IterRingQ<'_, T> {
9191
IterRingQ {
9292
ringq: self,
9393
pos: self.head,

awkernel_drivers/src/pcie/intel/igb/igb_hw.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6005,9 +6005,8 @@ impl IgbHw {
60056005
// operation, while the smaller eeproms are capable of an
60066006
// 8-byte PAGE WRITE operation. Break the inner loop to pass
60076007
// new address
6008-
if (((offset + widx as u32) * 2)
6009-
% self.eeprom.page_size.ok_or(IgbDriverErr::EEPROM)? as u32)
6010-
== 0
6008+
if ((offset + widx as u32) * 2)
6009+
.is_multiple_of(self.eeprom.page_size.ok_or(IgbDriverErr::EEPROM)? as u32)
60116010
{
60126011
self.standby_eeprom(info)?;
60136012
break;
@@ -6215,7 +6214,7 @@ impl IgbHw {
62156214
let mut i = 0;
62166215
let mut add;
62176216
while i < data.len() {
6218-
let act_offset = if (offset + i as u32) % 2 != 0 {
6217+
let act_offset = if !(offset + i as u32).is_multiple_of(2) {
62196218
add = 1;
62206219
bank_offset as u32 + (offset + i as u32 - 1) * 2
62216220
} else {

0 commit comments

Comments
 (0)