fix a clippy warning (#953)

22 jobs for master in 9 minutes and 31 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Check
passed #1167381
linux-docker
check-std

00:02:48

passed #1167382
linux-docker
check-wasm

00:02:33

 
  Workspace
passed #1167383
linux-docker
build-std

00:02:30

passed #1167384
linux-docker
build-wasm

00:02:01

failed #1167389
linux-docker
clippy-std

00:01:49

failed #1167390
linux-docker
clippy-wasm

00:01:23

passed #1167388
linux-docker
codecov

00:06:38

passed #1167386
linux-docker
docs

00:01:41

passed #1167391
linux-docker
fmt

00:01:30

passed #1167387
linux-docker
spellcheck

00:00:14

passed #1167385
linux-docker
test

00:05:11

 
  Examples
skipped #1167395
linux-docker
examples-clippy-std
skipped #1167396
linux-docker
examples-clippy-wasm
skipped #1167397
linux-docker
examples-contract-build
skipped #1167398
linux-docker
examples-contract-build-delegator
skipped #1167399
linux-docker
examples-docs
skipped #1167394
linux-docker
examples-fmt
skipped #1167392
linux-docker
examples-test
skipped #1167393
linux-docker
examples-test-experimental-engine
 
  Ink Waterfall
skipped #1167400
kubernetes-parity-build allowed to fail
ink-waterfall
 
  Fuzz
skipped #1167401
linux-docker
fuzz-tests
 
  Publish
passed #1167402
kubernetes-parity-build
publish-docs

00:00:34

 
Name Stage Failure
failed
clippy-std Workspace

error: could not compile `ink_storage` due to 2 previous errors

Caused by:
process didn't exit successfully: `sccache /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/clippy-driver rustc --crate-name bench_bitstash --edition=2018 crates/storage/benches/bench_bitstash.rs --error-format=json --json=diagnostic-rendered-ansi --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg test --cfg 'feature="criterion"' --cfg 'feature="default"' --cfg 'feature="ink-experimental-engine"' --cfg 'feature="ink-fuzz-tests"' --cfg 'feature="ink_metadata"' --cfg 'feature="scale-info"' --cfg 'feature="std"' -C metadata=ec5f90228b16fb32 -C extra-filename=-ec5f90228b16fb32 --out-dir /ci-cache/ink/targets/master/clippy-std/debug/deps -L dependency=/ci-cache/ink/targets/master/clippy-std/debug/deps --extern array_init=/ci-cache/ink/targets/master/clippy-std/debug/deps/libarray_init-d520f106eb414c9d.rmeta --extern cfg_if=/ci-cache/ink/targets/master/clippy-std/debug/deps/libcfg_if-88879d2dc0fa106c.rmeta --extern criterion=/ci-cache/ink/targets/master/clippy-std/debug/deps/libcriterion-ef6eb2cc7d960203.rmeta --extern derive_more=/ci-cache/ink/targets/master/clippy-std/debug/deps/libderive_more-d76304fb9fc7577e.so --extern ink_env=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_env-169feee00e1aff20.rmeta --extern ink_metadata=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_metadata-e9d7075ccc8d8110.rmeta --extern ink_prelude=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_prelude-9c4fd3a70d80f27a.rmeta --extern ink_primitives=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_primitives-abbde55cdecb37e7.rmeta --extern ink_storage=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_storage-b4a5c148e952d879.rmeta --extern ink_storage_derive=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_storage_derive-5b253763f61de2ac.so --extern itertools=/ci-cache/ink/targets/master/clippy-std/debug/deps/libitertools-3f1d276040a57964.rmeta --extern scale=/ci-cache/ink/targets/master/clippy-std/debug/deps/libparity_scale_codec-4e178a6e003031d8.rmeta --extern paste=/ci-cache/ink/targets/master/clippy-std/debug/deps/libpaste-1d007800db85bb25.so --extern quickcheck=/ci-cache/ink/targets/master/clippy-std/debug/deps/libquickcheck-b82aa72f48d5b568.rmeta --extern quickcheck_macros=/ci-cache/ink/targets/master/clippy-std/debug/deps/libquickcheck_macros-18bf6322d6d75355.so --extern scale_info=/ci-cache/ink/targets/master/clippy-std/debug/deps/libscale_info-51f4f9231baebb3c.rmeta` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
clippy-wasm Workspace
    = note: `-D clippy::needless-borrow` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: could not compile `ink_env` due to previous error

Caused by:
process didn't exit successfully: `sccache /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/clippy-driver rustc --crate-name ink_env --edition=2018 crates/env/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=d0fd2ea3d831ee55 -C extra-filename=-d0fd2ea3d831ee55 --out-dir /ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps --target wasm32-unknown-unknown -L dependency=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps -L dependency=/ci-cache/ink/targets/master/clippy-wasm/debug/deps --extern arrayref=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libarrayref-7ca543c11df82a23.rmeta --extern cfg_if=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libcfg_if-152302b13a9219ee.rmeta --extern derive_more=/ci-cache/ink/targets/master/clippy-wasm/debug/deps/libderive_more-6690cc6ea730e3ae.so --extern ink_allocator=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libink_allocator-aba6fd4e74807261.rmeta --extern ink_prelude=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libink_prelude-60058bf9a6a59b03.rmeta --extern ink_primitives=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libink_primitives-8198d64989c58682.rmeta --extern num_traits=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libnum_traits-6109f0b5c882ae0e.rmeta --extern scale=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libparity_scale_codec-5d23b7bea620bd5e.rmeta --extern paste=/ci-cache/ink/targets/master/clippy-wasm/debug/deps/libpaste-1d007800db85bb25.so --extern sp_arithmetic=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libsp_arithmetic-d2c1aeb65167eb1d.rmeta --extern static_assertions=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libstatic_assertions-a8388fa09641602e.rmeta` (exit status: 1)
Cleaning up file based variables
ERROR: Job failed: exit code 1