rust-lang/rust-clippy

False positive for boxed local with `wasm_bindgen`

Open

#4.351 aberto em 7 de ago. de 2019

Ver no GitHub
 (14 comments) (0 reactions) (0 assignees)Rust (1.391 forks)batch import
C-bugI-false-positivegood first issue

Métricas do repositório

Stars
 (10.406 stars)
Métricas de merge de PR
 (Mesclagem média 19d 22h) (113 fundiu PRs em 30d)

Description

wasm_bindgen is a little bit different than the issue that's been resolved with traits. In particular, wasm_bindgen just generates code around the non-trait implemented function, and the only way to use native JS arrays as parameters is to use Box<[...]>.

In general, I think maybe boxed slices should be considered ok for local parameters, as they're conceptually very similar to vectors.

Guia do colaborador