Removing deprecated crates from the workspace, the fmt checks for deprecated crates from the makefile, and a few updates to appease the new version of Clippy:
changing &mut store to store.as_mut_context()
adjust indentation in one set of docs
mark two imports that are only used if a particular feature is enabled are only imported when that feature is enabled
Why am I making this change?
CI always uses the latest stable version of Clippy and that version of Clippy introduced new checks which our code fails. I adjusted the workspace and the Makefile since I don't want to make changes to the deprecated quickjs-wasm-sys or quickjs-wasm-rs crates but still want to be able to run make fmt to see all failing Clippy checks that would show up in CI.
For the &mut store to store.as_mut_context() changes, Clippy seems to sometimes get confused when passing &mut store to a Wasmtime method that takes store: impl AsContextMut and states we should only pass store. Unfortunately the Rust compiler obviously complains when passing store without the &mut if store is referenced again later because Rust will treat it as a move. At first I wrote I just updated call sites where Clippy complained but then it looks inconsistent within a function or file where sometimes we're passing store.as_context_mut() and sometimes we're passing &mut store and it's not obvious why we're using the first in some places and the second in others. So, I decided to make passing stores consistent since the behaviour is identical anyway.
Checklist
[x] I've updated the relevant CHANGELOG files if necessary. Changes to javy-cli and javy-core do not require updating CHANGELOG files.
Description of the change
Removing deprecated crates from the workspace, the fmt checks for deprecated crates from the makefile, and a few updates to appease the new version of Clippy:
&mut store
tostore.as_mut_context()
Why am I making this change?
CI always uses the latest stable version of Clippy and that version of Clippy introduced new checks which our code fails. I adjusted the workspace and the
Makefile
since I don't want to make changes to the deprecatedquickjs-wasm-sys
orquickjs-wasm-rs
crates but still want to be able to runmake fmt
to see all failing Clippy checks that would show up in CI.For the
&mut store
tostore.as_mut_context()
changes, Clippy seems to sometimes get confused when passing&mut store
to a Wasmtime method that takesstore: impl AsContextMut
and states we should only passstore
. Unfortunately the Rust compiler obviously complains when passingstore
without the&mut
ifstore
is referenced again later because Rust will treat it as a move. At first I wrote I just updated call sites where Clippy complained but then it looks inconsistent within a function or file where sometimes we're passingstore.as_context_mut()
and sometimes we're passing&mut store
and it's not obvious why we're using the first in some places and the second in others. So, I decided to make passing stores consistent since the behaviour is identical anyway.Checklist
javy-cli
andjavy-core
do not require updating CHANGELOG files.