Skip to content

Conversation

@corneliusroemer
Copy link
Member

@corneliusroemer corneliusroemer commented Apr 27, 2025

Rust Analyzer currently supports >=1.78 and we are on 1.76 so upgrading is useful (apart from the general improvements in new versions)

I'm surprised that things still worked on Ubuntu 12.04 till upgrade to rustc 1.80, given Rust 1.64 started requiring glibc >= 2.17

Unit tests fail due to:

System.IO.IOException: No space left on device : '/home/runner/runners/2.323.0/_diag/Worker_20250427-192230-utc.log' at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset) at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer) at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) at System.Diagnostics.TextWriterTraceListener.Flush() at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id) at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message) at GitHub.Runner.Worker.Worker.RunAsync(String pipeIn, String pipeOut) at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args) System.IO.IOException: No space left on device : '/home/runner/runners/2.323.0/_diag/Worker_20250427-192230-utc.log' at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset) at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer) at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) at System.Diagnostics.TextWriterTraceListener.Flush() at GitHub.Runner.Common.HostTraceListener.WriteHeader(String source, TraceEventType eventType, Int32 id) at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message) at GitHub.Runner.Common.Tracing.Error(Exception exception) at GitHub.Runner.Worker.Program.MainAsync(IHostContext context, String[] args) Unhandled exception. System.IO.IOException: No space left on device : '/home/runner/runners/2.323.0/_diag/Worker_20250427-192230-utc.log' at System.IO.RandomAccess.WriteAtOffset(SafeFileHandle handle, ReadOnlySpan`1 buffer, Int64 fileOffset) at System.IO.Strategies.OSFileStreamStrategy.Write(ReadOnlySpan`1 buffer) at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) at System.Diagnostics.TextWriterTraceListener.Flush() at System.Diagnostics.TraceSource.Flush() at GitHub.Runner.Common.Tracing.Dispose(Boolean disposing) at GitHub.Runner.Common.Tracing.Dispose() at GitHub.Runner.Common.TraceManager.Dispose(Boolean disposing) at GitHub.Runner.Common.TraceManager.Dispose() at GitHub.Runner.Common.HostContext.Dispose(Boolean disposing) at GitHub.Runner.Common.HostContext.Dispose() at GitHub.Runner.Worker.Program.Main(String[] args)Show more

Comment on lines 9 to 10
license.workspace = true
lints.workspace = true
publish.workspace = true
Copy link
Member

@ivan-aksamentov ivan-aksamentov Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this remove root lints from the individual packages? (reverting them to defaults)

https://doc.rust-lang.org/cargo/reference/workspaces.html#the-lints-table

Need to check whether this

lints.workspace = true

is the same as suggested in the docs

[lints]
workspace = true

(deepseek says yes)

In the much praised toml format you can express things in different ways, that's why I don't like it and always do mistakes.

But we definitely want to inherit lints from the root Cargo.toml, no matter what the syntax for it is.

Another suspicion is that the upgrade goes quite a few versions forward, but you only have fixed a few lines of lints. This does not seem realistic. With the aggressive config we have, the lint warnings typically come in massive amounts after such upgrades. Lack of warnings kinda hints that the lints simply no longer work, outside of the default set (which I found lacking).

Comment on lines 245 to 247
let input_ref = input_ref
.as_ref()
.cloned()
.clone()
.or_else(|| {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... Is this equivalent? What was the warning?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: cloning an `Option<_>` using `.as_ref().cloned()`
   --> packages/nextclade-cli/src/dataset/dataset_download.rs:246:6
    |
246 |       .as_ref()
    |  ______^
247 | |     .cloned()
    | |___________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_cloned
    = note: `-W clippy::option-as-ref-cloned` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::option_as_ref_cloned)]`
help: this can be written more concisely by cloning the `Option<_>` directly
    |
246 |     .clone()
    |      ~~~~~


/// Runs analysis on one sequence and returns its result. This runs in many webworkers concurrently.
pub fn analyze(&mut self, input: &str) -> Result<String, JsError> {
pub fn analyze(& self, input: &str) -> Result<String, JsError> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra space. Let's also run full reformat after we are done in this PR.

Comment on lines 4 to 6
use num_traits::{clamp, clamp_max, clamp_min, AsPrimitive};
use schemars::gen::SchemaGenerator;
use schemars::r#gen::SchemaGenerator;
use schemars::schema::Schema;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no! They reserved the gen keyword :)

Comment on lines 118 to +119

record.seq_name = self.line[1..].trim().to_owned();
self.line[1..].trim().clone_into(&mut record.seq_name);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably bogus lint to disable (unless it isn't :))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the "avoiding allocations" will appeal to the perf in you ;)

https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Custom Clone::clone_from() or ToOwned::clone_into implementations allow the objects to share resources and therefore avoid allocations.

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/fasta.rs:119:5
    |
119 |     record.seq_name = self.line[1..].trim().to_owned();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `self.line[1..].trim().clone_into(&mut record.seq_name)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]`

Comment on lines 312 to 314

let builtin_attrs = vec![o!("clade")];
let builtin_attrs = [o!("clade")];
let attrs = chain!(
Copy link
Member

@ivan-aksamentov ivan-aksamentov Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a big deal, but this adds an extra heap allocation that seems to be useless

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: useless use of `vec!`
   --> packages/nextclade/src/io/nextclade_csv.rs:313:25
    |
313 |     let builtin_attrs = vec![o!("clade")];
    |                         ^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[o!("clade")]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
    = note: `-W clippy::useless-vec` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_vec)]`

@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Apr 28, 2025

I am a bit busy on a large feature Richard waits for. Not a fantastic time for an upgrade :)

Is this something that we need right now? Rust Analyzer, meaning VSCode plugin stopped working or what? I thought rust analyzer comes with the toolchain and is always compatible.

Any particular reason it's now rust 1.80.0? (not the minimum required, and not the latest, but something in between)

I love updates too, but what keeps me from updating Nextclade in particular is the wasm and especially dev mode of Nextclade Web. The wasm-bindgen based setup is very fragile. Last time I touched something I've got white screen in the browser and this blocked dev process entirely. So we need to ensure web prod and dev works (not just builds). But you can only know if you actually try and change something in the web app (rust and ts).

As I mentioned, it is expected that there's a massive amount of work on fixing or disabling new lints after rust upgrade. As I don't see it in the diff, and don't see any warnings, I assume lints no longer work. But I could be wrong.

Regarding disk space failure - no idea. Perhaps the caches are too big and might need to reset them? But don't have time to check this currently.

@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Apr 28, 2025

Oh no, I think that

[package]
lints.workspace = true

is not the same as

[lints]
workspace = true

The lints might have never worked in the first place. I think they only started to respect this config recently.

So yes, toml is a lovely format :)

@corneliusroemer
Copy link
Member Author

corneliusroemer commented Apr 28, 2025

Oh I just wanted to play with Rust, no pressure here! Ah now I remember you mentioning the challenge with wasm and dev.

The time lines are not the same! But cargo said this entry wasn't used at all and emitted a warning in 1.80, so I trusted it. Was it or I wrong? 😄

Lints still work afaict, I resolved and/or allowed the ones that came up.

@corneliusroemer
Copy link
Member Author

Here are the full lints if I just upgrade the toolchain and not change anything else :)

Details
$ cargo clippy
warning: /Users/cr/code/nextclade/Cargo.toml: unused manifest key: workspace.package.name
warning: /Users/cr/code/nextclade/packages/nextclade-cli/Cargo.toml: unused manifest key: package.lints
warning: /Users/cr/code/nextclade/packages/nextclade-web/Cargo.toml: unused manifest key: package.lints
...
    Checking nextclade v3.13.1 (/Users/cr/code/nextclade/packages/nextclade)
warning: lint `unused_tuple_struct_fields` has been renamed to `dead_code`
  |
  = help: use the new name `dead_code`
  = note: requested on the command line with `-W unused_tuple_struct_fields`
  = note: `#[warn(renamed_and_removed_lints)]` on by default

warning: `gen` is a keyword in the 2024 edition
 --> packages/nextclade/src/coord/position.rs:5:15
  |
5 | use schemars::gen::SchemaGenerator;
  |               ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
  |
  = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
  = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>
  = note: `-W keyword-idents-2024` implied by `-W keyword-idents`
  = help: to override `-W keyword-idents` add `#[allow(keyword_idents_2024)]`

warning: `gen` is a keyword in the 2024 edition
   --> packages/nextclade/src/coord/position.rs:277:18
    |
277 |   fn json_schema(gen: &mut SchemaGenerator) -> Schema {
    |                  ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
    |
    = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
   --> packages/nextclade/src/coord/position.rs:278:5
    |
278 |     gen.subschema_for::<isize>()
    |     ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
    |
    = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
    = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
 --> packages/nextclade/src/gene/frame.rs:4:15
  |
4 | use schemars::gen::SchemaGenerator;
  |               ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
  |
  = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
  = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/gene/frame.rs:49:18
   |
49 |   fn json_schema(gen: &mut SchemaGenerator) -> Schema {
   |                  ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/gene/frame.rs:50:5
   |
50 |     gen.subschema_for::<i8>()
   |     ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
 --> packages/nextclade/src/gene/phase.rs:4:15
  |
4 | use schemars::gen::SchemaGenerator;
  |               ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
  |
  = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
  = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/gene/phase.rs:56:18
   |
56 |   fn json_schema(gen: &mut SchemaGenerator) -> Schema {
   |                  ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/gene/phase.rs:57:5
   |
57 |     gen.subschema_for::<i8>()
   |     ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
 --> packages/nextclade/src/graph/edge.rs:6:15
  |
6 | use schemars::gen::SchemaGenerator;
  |               ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
  |
  = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
  = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/graph/edge.rs:51:18
   |
51 |   fn json_schema(gen: &mut SchemaGenerator) -> Schema {
   |                  ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/graph/edge.rs:52:5
   |
52 |     gen.subschema_for::<usize>()
   |     ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
 --> packages/nextclade/src/graph/node.rs:4:15
  |
4 | use schemars::gen::SchemaGenerator;
  |               ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
  |
  = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
  = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/graph/node.rs:62:18
   |
62 |   fn json_schema(gen: &mut SchemaGenerator) -> Schema {
   |                  ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: `gen` is a keyword in the 2024 edition
  --> packages/nextclade/src/graph/node.rs:63:5
   |
63 |     gen.subschema_for::<usize>()
   |     ^^^ help: you can use a raw identifier to stay compatible: `r#gen`
   |
   = warning: this is accepted in the current edition (Rust 2021) but is a hard error in Rust 2024!
   = note: for more information, see issue #49716 <https://github.com/rust-lang/rust/issues/49716>

warning: unexpected `cfg` condition value: `debug-seed-alignment`
   --> packages/nextclade/src/align/seed_alignment.rs:214:7
    |
214 | #[cfg(feature = "debug-seed-alignment")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove the condition
    |
    = note: no expected values for `feature`
    = help: consider adding `debug-seed-alignment` as a feature in `Cargo.toml`
    = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
    = note: `#[warn(unexpected_cfgs)]` on by default

warning: unnecessary qualification
   --> packages/nextclade/src/coord/position.rs:131:5
    |
131 |     std::fmt::Display::fmt(&self.inner, f)
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: requested on the command line with `-W unused-qualifications`
help: remove the unnecessary path segments
    |
131 -     std::fmt::Display::fmt(&self.inner, f)
131 +     Display::fmt(&self.inner, f)
    |

warning: unnecessary qualification
   --> packages/nextclade/src/coord/position.rs:142:5
    |
142 |     std::fmt::Debug::fmt(&self.inner, f)
    |     ^^^^^^^^^^^^^^^^^^^^
    |
help: remove the unnecessary path segments
    |
142 -     std::fmt::Debug::fmt(&self.inner, f)
142 +     Debug::fmt(&self.inner, f)
    |

warning: unnecessary qualification
  --> packages/nextclade/src/tree/split_muts2.rs:57:10
   |
57 |     .map(std::clone::Clone::clone)
   |          ^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: remove the unnecessary path segments
   |
57 -     .map(std::clone::Clone::clone)
57 +     .map(Clone::clone)
   |

warning: unnecessary qualification
  --> packages/nextclade/src/tree/split_muts2.rs:62:10
   |
62 |     .map(std::clone::Clone::clone)
   |          ^^^^^^^^^^^^^^^^^^^^^^^^
   |
help: remove the unnecessary path segments
   |
62 -     .map(std::clone::Clone::clone)
62 +     .map(Clone::clone)
   |

warning: lint group `future_incompatible` has the same priority (0) as a lint
   --> Cargo.toml:104:1
    |
104 | future_incompatible = "warn"
    | ^^^^^^^^^^^^^^^^^^^   ------ has an implicit priority of 0
...
108 | trivial_numeric_casts = "warn"
    | --------------------- has the same priority as this lint
    |
    = note: the order of the lints in the table is ignored by Cargo
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
    = note: `-W clippy::lint-groups-priority` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::lint_groups_priority)]`
help: to have lints override the group set `future_incompatible` to a lower priority
    |
104 | future_incompatible = { level = "warn", priority = -1 }
    |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: lint group `keyword_idents` has the same priority (0) as a lint
   --> Cargo.toml:119:1
    |
119 | keyword_idents = "warn"
    | ^^^^^^^^^^^^^^   ------ has an implicit priority of 0
120 | let_underscore_drop = "warn"
    | ------------------- has the same priority as this lint
    |
    = note: the order of the lints in the table is ignored by Cargo
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
help: to have lints override the group set `keyword_idents` to a lower priority
    |
119 | keyword_idents = { level = "warn", priority = -1 }
    |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: lint group `nonstandard_style` has the same priority (0) as a lint
   --> Cargo.toml:105:1
    |
105 | nonstandard_style = "warn"
    | ^^^^^^^^^^^^^^^^^   ------ has an implicit priority of 0
...
108 | trivial_numeric_casts = "warn"
    | --------------------- has the same priority as this lint
    |
    = note: the order of the lints in the table is ignored by Cargo
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
help: to have lints override the group set `nonstandard_style` to a lower priority
    |
105 | nonstandard_style = { level = "warn", priority = -1 }
    |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: lint group `rust_2018_idioms` has the same priority (0) as a lint
   --> Cargo.toml:106:1
    |
106 | rust_2018_idioms = "warn"
    | ^^^^^^^^^^^^^^^^   ------ has an implicit priority of 0
107 | rust_2021_compatibility = "warn"
108 | trivial_numeric_casts = "warn"
    | --------------------- has the same priority as this lint
    |
    = note: the order of the lints in the table is ignored by Cargo
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
help: to have lints override the group set `rust_2018_idioms` to a lower priority
    |
106 | rust_2018_idioms = { level = "warn", priority = -1 }
    |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: lint group `rust_2021_compatibility` has the same priority (0) as a lint
   --> Cargo.toml:107:1
    |
107 | rust_2021_compatibility = "warn"
    | ^^^^^^^^^^^^^^^^^^^^^^^   ------ has an implicit priority of 0
108 | trivial_numeric_casts = "warn"
    | --------------------- has the same priority as this lint
    |
    = note: the order of the lints in the table is ignored by Cargo
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lint_groups_priority
help: to have lints override the group set `rust_2021_compatibility` to a lower priority
    |
107 | rust_2021_compatibility = { level = "warn", priority = -1 }
    |                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

warning: renamed function parameter of trait impl
   --> packages/nextclade/src/align/band_2d.rs:152:19
    |
152 |   fn index(&self, index2d: (I, J)) -> &Self::Output {
    |                   ^^^^^^^ help: consider using the default name: `index`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params
    = note: `-W clippy::renamed-function-params` implied by `-W clippy::restriction`
    = help: to override `-W clippy::restriction` add `#[allow(clippy::renamed_function_params)]`

warning: renamed function parameter of trait impl
   --> packages/nextclade/src/align/band_2d.rs:160:27
    |
160 |   fn index_mut(&mut self, index2d: (I, J)) -> &mut Self::Output {
    |                           ^^^^^^^ help: consider using the default name: `index`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params

warning: use of % has been disallowed in this context
  --> packages/nextclade/src/align/gap_open.rs:34:12
   |
34 |         if cds_pos % 3 == codon_start {
   |            ^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used
   = note: `-W clippy::integer-division-remainder-used` implied by `-W clippy::restriction`
   = help: to override `-W clippy::restriction` add `#[allow(clippy::integer_division_remainder_used)]`

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/align/seed_alignment.rs:118:23
    |
118 |     let mean_offset = (next_seed.offset + current_seed.offset) / 2; // offset of gap seed
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/align/seed_alignment.rs:119:17
    |
119 |     let shift = abs_shift(current_seed, next_seed) / 2; // distance from mean offset
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/align/seed_match.rs:200:50
    |
200 |     let mut chopped_matches = Vec::with_capacity(length / config.min_match_length + 1);
    |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/align/seed_match.rs:257:41
    |
257 |               let unskipped_qry_index = skipped_qry_index * 3 / 2 + skipped_qry_offset;
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/align/seed_match.rs:258:41
    |
258 |               let unskipped_ref_index = skipped_ref_index * 3 / 2 + skipped_ref_offset;
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
 --> packages/nextclade/src/analyze/group_adjacent_deletions.rs:9:39
  |
9 |   let mut ranges = Vec::with_capacity(dels.len() / 2);
  |                                       ^^^^^^^^^^^^^^
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
  --> packages/nextclade/src/coord/coord_map_local.rs:42:30
   |
42 |     let pos_adjusted = pos + (3 - pos % 3) % 3;
   |                              ^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
  --> packages/nextclade/src/coord/coord_map_local.rs:42:35
   |
42 |     let pos_adjusted = pos + (3 - pos % 3) % 3;
   |                                   ^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
  --> packages/nextclade/src/coord/coord_map_local.rs:43:24
   |
43 |     AaRefPosition::new(pos_adjusted / 3)
   |                        ^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: doc list item missing indentation
   --> packages/nextclade/src/coord/position.rs:425:5
    |
425 | ///   Come back to this if Rust "specialization" feature is stabilized:
    |     ^^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
    = note: `-W clippy::doc-lazy-continuation` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::doc_lazy_continuation)]`
help: indent this line
    |
425 | ///      Come back to this if Rust "specialization" feature is stabilized:
    |       +++

warning: doc list item missing indentation
   --> packages/nextclade/src/coord/position.rs:427:5
    |
427 | ///   and/or if `auto_ops` crate finds another way to work with generics:
    |     ^^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
    |
427 | ///      and/or if `auto_ops` crate finds another way to work with generics:
    |       +++

warning: doc list item missing indentation
   --> packages/nextclade/src/coord/position.rs:429:5
    |
429 | ///   The operators can then be implemented only once for the generic type, instead of for each of the specialized types.
    |     ^^
    |
    = help: if this is supposed to be its own paragraph, add a blank line
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
help: indent this line
    |
429 | ///      The operators can then be implemented only once for the generic type, instead of for each of the specialized types.
    |       +++

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:462:1
    |
462 | impl_ops_for_pos!(NucAlnGlobalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:462:1
    |
462 | impl_ops_for_pos!(NucAlnGlobalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:463:1
    |
463 | impl_ops_for_pos!(NucRefGlobalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:463:1
    |
463 | impl_ops_for_pos!(NucRefGlobalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:464:1
    |
464 | impl_ops_for_pos!(NucAlnLocalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:464:1
    |
464 | impl_ops_for_pos!(NucAlnLocalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:465:1
    |
465 | impl_ops_for_pos!(NucRefLocalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:465:1
    |
465 | impl_ops_for_pos!(NucRefLocalPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:466:1
    |
466 | impl_ops_for_pos!(AaAlnPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:466:1
    |
466 | impl_ops_for_pos!(AaAlnPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:467:1
    |
467 | impl_ops_for_pos!(AaRefPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/coord/position.rs:467:1
    |
467 | impl_ops_for_pos!(AaRefPosition);
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/gene/gene.rs:174:5
    |
174 |     (self.len() - self.len() % 3) / 3
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/gene/gene.rs:174:19
    |
174 |     (self.len() - self.len() % 3) / 3
    |                   ^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/gene/gene_map_display.rs:218:16
    |
218 |   let codons = nuc_len / 3;
    |                ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/gene/gene_map_display.rs:219:30
    |
219 |   let codons_decimal = match nuc_len % 3 {
    |                              ^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
  --> packages/nextclade/src/gene/phase.rs:20:11
   |
20 |     match (3 - local_begin.as_isize() % 3) % 3 {
   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
  --> packages/nextclade/src/gene/phase.rs:20:16
   |
20 |     match (3 - local_begin.as_isize() % 3) % 3 {
   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: renamed function parameter of trait impl
   --> packages/nextclade/src/graph/edge.rs:106:17
    |
106 |   fn fmt(&self, fmt: &mut Formatter<'_>) -> core::fmt::Result {
    |                 ^^^ help: consider using the default name: `f`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/fasta.rs:119:5
    |
119 |     record.seq_name = self.line[1..].trim().to_owned();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `self.line[1..].trim().clone_into(&mut record.seq_name)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `-W clippy::assigning-clones` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::assigning_clones)]`

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> packages/nextclade/src/io/gff3_writer.rs:82:3
   |
82 |   *record.source_mut() = o!("nextclade");
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into("nextclade", record.source_mut())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> packages/nextclade/src/io/gff3_writer.rs:83:3
   |
83 |   *record.feature_type_mut() = o!("gene");
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into("gene", record.feature_type_mut())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> packages/nextclade/src/io/gff3_writer.rs:86:3
   |
86 |   *record.score_mut() = o!(".");
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(".", record.score_mut())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> packages/nextclade/src/io/gff3_writer.rs:88:3
   |
88 |   *record.frame_mut() = o!(".");
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(".", record.frame_mut())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> packages/nextclade/src/io/gff3_writer.rs:97:3
   |
97 |   *record.source_mut() = o!("nextclade");
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into("nextclade", record.source_mut())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> packages/nextclade/src/io/gff3_writer.rs:98:3
   |
98 |   *record.feature_type_mut() = o!("CDS");
   |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into("CDS", record.feature_type_mut())`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:101:3
    |
101 |   *record.score_mut() = o!(".");
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(".", record.score_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:110:3
    |
110 |   *record.seqname_mut() = seqid.to_owned();
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `seqid.clone_into(record.seqname_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:111:3
    |
111 |   *record.source_mut() = o!("nextclade");
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into("nextclade", record.source_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:112:3
    |
112 |   *record.feature_type_mut() = o!("region");
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into("region", record.feature_type_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:115:3
    |
115 |   *record.score_mut() = o!(".");
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(".", record.score_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:116:3
    |
116 |   *record.strand_mut() = o!(".");
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(".", record.strand_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> packages/nextclade/src/io/gff3_writer.rs:117:3
    |
117 |   *record.frame_mut() = o!(".");
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(".", record.frame_mut())`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: assigning the result of `Clone::clone()` may be inefficient
  --> packages/nextclade/src/io/results_json.rs:67:5
   |
67 |     this.nextclade_web_version = nextclade_web_version.clone();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `this.nextclade_web_version.clone_from(nextclade_web_version)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

warning: direct implementation of `ToString`
  --> packages/nextclade/src/qc/qc_run.rs:26:1
   |
26 | / impl ToString for QcStatus {
27 | |   fn to_string(&self) -> String {
28 | |     match self {
29 | |       QcStatus::Good => "good".to_owned(),
...  |
33 | |   }
34 | | }
   | |_^
   |
   = help: prefer implementing `Display` instead
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
   = note: `-W clippy::to-string-trait-impl` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::to_string_trait_impl)]`

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/sort/minimizer_search.rs:120:8
    |
120 |     if i % 3 == 2 {
    |        ^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/translate/translate.rs:205:24
    |
205 |   let peptide_length = gene_nuc_seq.len() / 3;
    |                        ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/translate/translate_genes.rs:154:20
    |
154 |   let band_width = (qry_gaps.internal + ref_gaps.internal) / 3 + BASE_BAND_WIDTH;
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/translate/translate_genes.rs:156:5
    |
156 |     (qry_gaps.leading as i32 - ref_gaps.leading as i32) / 3 + (qry_gaps.internal as i32 - ref_gaps.internal as i32) / 6;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of / has been disallowed in this context
   --> packages/nextclade/src/translate/translate_genes.rs:156:63
    |
156 |     (qry_gaps.leading as i32 - ref_gaps.leading as i32) / 3 + (qry_gaps.internal as i32 - ref_gaps.internal as i32) / 6;
    |                                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/translate/translate_genes.rs:179:22
    |
179 |   let end = length - (length % 3);
    |                      ^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: use of % has been disallowed in this context
   --> packages/nextclade/src/translate/translate_genes.rs:182:31
    |
182 |       let triplet_begin = i - (i % 3);
    |                               ^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#integer_division_remainder_used

warning: renamed function parameter of trait impl
  --> packages/nextclade/src/utils/vec2d.rs:56:19
   |
56 |   fn index(&self, index2d: (usize, usize)) -> &Self::Output {
   |                   ^^^^^^^ help: consider using the default name: `index`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params

warning: renamed function parameter of trait impl
  --> packages/nextclade/src/utils/vec2d.rs:65:27
   |
65 |   fn index_mut(&mut self, index2d: (usize, usize)) -> &mut Self::Output {
   |                           ^^^^^^^ help: consider using the default name: `index`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params

warning: renamed function parameter of trait impl
  --> packages/nextclade/src/utils/vec2d.rs:76:19
   |
76 |   fn index(&self, index2d: (i32, i32)) -> &Self::Output {
   |                   ^^^^^^^ help: consider using the default name: `index`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params

warning: renamed function parameter of trait impl
  --> packages/nextclade/src/utils/vec2d.rs:85:27
   |
85 |   fn index_mut(&mut self, index2d: (i32, i32)) -> &mut Self::Output {
   |                           ^^^^^^^ help: consider using the default name: `index`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#renamed_function_params

warning: useless use of `vec!`
   --> packages/nextclade/src/io/nextclade_csv.rs:313:25
    |
313 |     let builtin_attrs = vec![o!("clade")];
    |                         ^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[o!("clade")]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
    = note: `-W clippy::useless-vec` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_vec)]`

warning: `nextclade` (lib) generated 88 warnings (run `cargo clippy --fix --lib -p nextclade` to apply 20 suggestions)
    Checking nextclade-cli v3.13.1 (/Users/cr/code/nextclade/packages/nextclade-cli)
warning: cloning an `Option<_>` using `.as_ref().cloned()`
   --> packages/nextclade-cli/src/dataset/dataset_download.rs:246:6
    |
246 |       .as_ref()
    |  ______^
247 | |     .cloned()
    | |___________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_as_ref_cloned
    = note: `-W clippy::option-as-ref-cloned` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::option_as_ref_cloned)]`
help: this can be written more concisely by cloning the `Option<_>` directly
    |
246 |     .clone()
    |      ~~~~~

warning: `nextclade-cli` (lib) generated 7 warnings (6 duplicates) (run `cargo clippy --fix --lib -p nextclade-cli` to apply 1 suggestion)
warning: `nextclade-cli` (bin "nextclade") generated 6 warnings (6 duplicates)
warning: `nextclade` (lib) generated 88 warnings (88 duplicates)
   Compiling nextclade-web v3.13.1 (/Users/cr/code/nextclade/packages/nextclade-web)
warning: `nextclade-web` (build script) generated 6 warnings (6 duplicates)
warning: this argument is a mutable reference, but not used mutably
  --> packages/nextclade-web/src/wasm/main.rs:72:18
   |
72 |   pub fn analyze(&mut self, input: &str) -> Result<String, JsError> {
   |                  ^^^^^^^^^ help: consider changing to: `&self`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
   = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery`
   = help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]`

warning: `nextclade-web` (lib) generated 7 warnings (6 duplicates)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 40.31s

Without loose setting in next config, I got an error

```
 cross-env NODE_ENV=development BABEL_ENV=development babel-node --config-file "./babel-node.config.js" --extensions ".ts" tools/monkeyPatch.ts
$ cross-env NODE_ENV=development BABEL_ENV=development NODE_OPTIONS=--max_old_space_size=8192  babel-node --config-file "./babel-node.config.js" --config-file "./babel-node.config.js" --extensions ".js,.ts" -- node_modules/.bin/next dev --hostname 0.0.0.0 --port 3000
ready - started server on 0.0.0.0:3000, url: http://localhost:3000

✔ @nextstrain/nextclade-web
  Compiled successfully in 4.72s

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
 DONE  Compiled successfully in 4726ms                                                                                                                                                                                                     3:02:32 PM

error - ./src/gen/nextclade-wasm_bg.wasm
Module not found: ESM packages (./nextclade-wasm_bg.js) need to be imported. Use 'import' to reference the package instead. https://nextjs.org/docs/messages/import-esm-externals
```
resolves #1605

- Replace deprecated `FileReader.readAsBinaryString(file)` with recommended `readAsArrayBuffer(file)`
- Adapt readFile function to use array buffer
- Make encoding detection use at most 64kB (perf, borrowed from VS Code)

It's unclear why Chromium 136 suddenly caused the crash, but moving away from the deprecated method seems to fix it, so why not.
@ivan-aksamentov ivan-aksamentov merged commit 9354e53 into master Jan 9, 2026
19 checks passed
@ivan-aksamentov ivan-aksamentov deleted the rust-177 branch January 9, 2026 03:27
@ivan-aksamentov
Copy link
Member

ivan-aksamentov commented Jan 9, 2026

#1716
#1717
#1718
#1719
#1720
#1721

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants