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

Embedded migrations: Dead code warning #865

Closed
dbrgn opened this Issue Apr 20, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@dbrgn
Contributor

dbrgn commented Apr 20, 2017

As mentioned here #854 (comment), using embedded migrations with run_with_output results in a dead code warning.

warning: function is never used: `run`, #[warn(dead_code)] on by default
  --> src/db/mod.rs:62:1
   |
62 | embed_migrations!();
   | ^^^^^^^^^^^^^^^^^^^^
   |
   = note: this error originates in a macro outside of the current crate

Would it be possible to add an exception for that? I didn't easily find out where to add it.

CC @Eijebong @weiznich

@killercup

This comment has been minimized.

Member

killercup commented Apr 20, 2017

Yes, add #[allow(unused)] to the mods here.

@dbrgn

This comment has been minimized.

Contributor

dbrgn commented Apr 20, 2017

@killercup Ok, I'll create a pull request :)

dbrgn added a commit to dbrgn/diesel that referenced this issue Apr 20, 2017

Allow dead code in embedded migrations
This gets rid of a warning when using `run_with_output`.

Fixes diesel-rs#865
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment