seed-rs / seed

A Rust framework for creating web apps
MIT License
3.81k stars 155 forks source link

Change type alias to struct #595

Closed zakaluka closed 3 years ago

zakaluka commented 3 years ago

Currently, cargo make verify fails because of an implicit-clone

    Checking gloo-events v0.1.1
    Checking gloo-timers v0.2.1
    Checking gloo-file v0.1.0
error: implicitly cloning a `Blob` by calling `to_owned` on its dereferenced type
  --> src\browser\web_socket\message.rs:51:51
   |
51 |             let blob = gloo_file::Blob::from(blob.to_owned());
   |                                                   ^^^^^^^^ help: consider using: `clone`
   |
   = note: `-D clippy::implicit-clone` implied by `-D clippy::pedantic`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#implicit_clone

error: aborting due to previous error

error: could not compile `seed`
zakaluka commented 3 years ago

This is for seed-rs/seed-quickstart#29

MartinKavik commented 3 years ago

Feel free to fix it according to the Clippy's suggestions :)

zakaluka commented 3 years ago

After I switched to the stable toolchain, the clippy error disappeared. Hopefully this one is good to go.