CI green again: clippy clean in both builds, budget tests follow VICTORY_INDIRECT_REST
CI on main stopped at its first step (clippy, 40+ findings), so the
diagnostics clippy and the tests never ran. Locally all three steps of
.github/workflows/ci.yml now pass.
Tests: two indirect budget tests still assumed VICTORY_INDIRECT_REST on,
which 545f890 turned off by default.
- host_list_budget_starts_empty_at_each_submission: the big records now
fill the budget exactly, so the small record after them runs empty with
REST on or off and the test still shows that no budget carries over.
- warp_batch_charges_every_execution: the expected spend follows the REST
rule in force (a job that does not fit takes nothing without REST).
Both pass with VICTORY_INDIRECT_REST unset and =1.
Clippy:
- mechanical: is_multiple_of, shift precedence, sort_by_key with Reverse,
hex digit groups, contains_key, annotated transmutes, mem::take,
from_ref, a same-type cast, an if with identical branches;
- host/indirects.rs and placed_filler_twins are only used by the
diagnostics build and are only compiled there;
- removed the never-used `batched` in make_from and the never-read
depth_written field; Touch::Title is only built by tests, marked so;
- book.rs: the heap that keeps the descriptor alive is a named field;
- ResourceDesc::from_level(&self) renamed levels_from;
- allowed with a reason: two 8-argument functions, the Late enum (boxing
a flight would allocate per flight) and the CLI Command enum;
- apps/victory: default_paths moved above the test module; the match on
a block in play.rs binds the block first.
No change in what the game runs.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 7331b07bde8d7beca973f24a0575ca1866d034d4)
This commit is contained in:
1 parent
800dada337
commit
9b712a6ab2
31 files changed
+102
-72
No files matched your search
@@ -3095,6 +3095,9 @@ struct Flight {
|
||||
}
|
||||
|
||||
/// One thing in the line of what waits for the card, in order.
|
||||
// A flight is far larger than the other variants; boxing it would add an
|
||||
// allocation per flight on the submission path, so it stays inline.
|
||||
#[allow(clippy::large_enum_variant)]
|
||||
enum Late {
|
||||
Run(Flight),
|
||||
/// A bottom-of-pipe write of the flight before it: address, what, bytes.
|
||||
@@ -3321,7 +3324,7 @@ fn blame_stale(stale: &[(std::sync::Arc<crate::shadow::Shadow>, usize, usize)])
|
||||
/// title memory read, took `us`.
|
||||
#[cfg(feature = "diagnostics")]
|
||||
fn blamed(why: usize, us: u64) {
|
||||
let (named, refused) = std::mem::replace(&mut *BLAMED.lock().unwrap_or_else(|e| e.into_inner()), (None, ""));
|
||||
let (named, refused) = std::mem::take(&mut *BLAMED.lock().unwrap_or_else(|e| e.into_inner()));
|
||||
let (key, at) = match (why, named) {
|
||||
(WHY_READ | WHY_STALE, Some(named)) => named,
|
||||
(WHY_READ, None) => (("a host copy of what a copy done on the card wrote", refused, 0, 0, 0), 0),
|
||||
@@ -4193,6 +4196,7 @@ fn late_line(frames: f64) {
|
||||
pub(crate) mod aside;
|
||||
pub(crate) mod awake;
|
||||
mod card_steps;
|
||||
#[cfg(feature = "diagnostics")]
|
||||
pub(crate) mod indirects;
|
||||
mod font;
|
||||
mod menu;
|
||||
@@ -8638,7 +8642,9 @@ enum Touch {
|
||||
Refresh(usize, usize, usize),
|
||||
/// The copy is given to shaders.
|
||||
Write(usize),
|
||||
/// Title memory is written.
|
||||
/// Title memory is written. The callers stop their walk there instead
|
||||
/// (`refresh_ahead`); the tests of [`written_spans`] use it.
|
||||
#[cfg_attr(not(test), allow(dead_code))]
|
||||
Title,
|
||||
Nothing,
|
||||
/// Another part of the submission begins.
|
||||
|
||||
Reference in new issue
Block a user