Skip to content

Conversation

ysimonson
Copy link
Contributor

This fixes most clippy warnings in capnpc autogenerated code, including:

This does not semantically change the code that is generated, though the needless lifetimes fix might not be compatible with older versions of rustc (I seem to vaguely recall lifetime elison getting smarter at some point, so the explicit lifetimes may have been necessary to compile on older versions of rustc.)

For my schema, it reduces the warnings from several hundred to several dozen. The fix for the remaining warnings would require backwards-incompatible changes, so I will open a separate PR for that.

@ysimonson
Copy link
Contributor Author

Tests are passing locally when I run cargo test, but failing on TravisCI. Should I run something else to execute the entire test suite?

@dwrensha
Copy link
Member

dwrensha commented Nov 8, 2018

error on Travis:

       self.builder.set_data_field::<i8>(2, i8::from(0u8));
     |                                            ^^^^^^^^ the trait `std::convert::From<u8>` is not implemented for `i8`

@dwrensha
Copy link
Member

dwrensha commented Nov 8, 2018

Maybe try cargo test --all?

@dwrensha dwrensha merged commit 2e7e1b4 into capnproto:master Nov 8, 2018
@dwrensha
Copy link
Member

dwrensha commented Nov 8, 2018

Thanks!

@ysimonson ysimonson deleted the clippy-warnings branch November 8, 2018 01:54
@ysimonson ysimonson restored the clippy-warnings branch December 11, 2019 00:57
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.

2 participants