Keep the test scene's own arithmetic from overflowing a u64
The first compile this branch ever had. `cargo fmt` reflowed four files and clippy passed at -D warnings untouched, but one test panicked: `the_signature_does_not_change_with_scale`, on "attempt to multiply with overflow". It is the fixture, not the feature. `scene()`'s little LCG multiplied the block's y by the golden-ratio constant with a plain `*` while the term beside it already used `wrapping_mul`, so any scene taller than about 104 pixels overflowed in debug. Only the scale test builds one that large, which is why 345 of 346 passed around it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -179,11 +179,7 @@ thread_local! {
|
||||
/// Deliberately silent otherwise. The sweeps around it report progress because
|
||||
/// they run for tens of minutes; this is seconds, and a status line for it would
|
||||
/// be a line the user must read in order to learn nothing.
|
||||
pub fn start_pass(
|
||||
catalog_path: PathBuf,
|
||||
thumbs_dir: PathBuf,
|
||||
grouped: impl Fn(usize) + 'static,
|
||||
) {
|
||||
pub fn start_pass(catalog_path: PathBuf, thumbs_dir: PathBuf, grouped: impl Fn(usize) + 'static) {
|
||||
// A second pass would read the same rows and write the same answer over the
|
||||
// first one's transactions.
|
||||
if RUNNING.get() {
|
||||
|
||||
Reference in New Issue
Block a user