Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/crate name and travis #131

Merged
merged 4 commits into from
Nov 11, 2019

Conversation

MartinKavik
Copy link
Collaborator

Fixes #125


.travis.yml - I use pedantic clippy in my projects, example from Seed's repo:

command = "cargo"
args = ["clippy", "--all-features", "--", "--deny", "warnings", "--deny", "clippy::pedantic", "--deny", "clippy::nursery"]

=> can I add the similar command also into this project?
There is only cargo clippy --all in the current .travis.yml so clippy warnings are basically ignored.


And there are one clippy warning:

warning content
warning: large size difference between variants
  --> src\types\addons\mod.rs:65:5
   |
65 | /     Meta {
66 | |         // NOTE: we are not putting this in Option<>, since that way it gives us a valid
67 | |         // fallback to all of the previous variants, therefore resulting in inaccurate err messages
68 | |         // To support other /meta/ responses (meta extensions), we should make a MetaExt variant
69 | |         meta: MetaDetail,
70 | |     },
   | |_____^
   |
   = note: `#[warn(clippy::large_enum_variant)]` on by default
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_en
um_variant
help: consider boxing the large fields to reduce the total size of the enum
   |
69 |         meta: Box<MetaDetail>,
   |               ^^^^^^^^^^^^^^^

How do you want to resolve it?

  • Add Box
  • Decorate with #[allow(clippy::...
  • Change size threshold

@Ivshti
Copy link
Member

Ivshti commented Nov 11, 2019

there's a clippy.toml currently which has increased the size threshold, but apparently now with the more stuff in MetaDetail this has happened again

I'd rather increase the overall limit again and once it breaks it, we'll box it

We are aware of the implications

Copy link
Member

@Ivshti Ivshti left a comment

Choose a reason for hiding this comment

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

Just apply the max enum-variant-size-threshold

@Ivshti Ivshti merged commit 463a82c into Stremio:master Nov 11, 2019
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.

proper crate name
2 participants