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 warning when building site tests #936

Merged
merged 1 commit into from Jan 26, 2020

Conversation

traviscross
Copy link
Contributor

For the site integration tests, we have a file of common code which is
used by multiple files in tests/. However, not all functions in
this file are used by all files in tests/.

As Cargo compiles each tests/*.rs file as a separate crate, this
means that some of these crates end up with unused code. Rust notices
this and prints a warning.

Let's tell Rust that we don't care about dead code in this file so
that the warning is not printed.

For the site integration tests, we have a file of common code which is
used by multiple files in `tests/`.  However, not all functions in
this file are used by all files in `tests/`.

As Cargo compiles each `tests/*.rs` file as a separate crate, this
means that some of these crates end up with unused code.  Rust notices
this and prints a warning.

Let's tell Rust that we don't care about dead code in this file so
that the warning is not printed.
@Keats Keats merged commit 67ca846 into getzola:next Jan 26, 2020
@Keats
Copy link
Collaborator

Keats commented Jan 26, 2020

Thanks; that annoyed me greatly!

Keats pushed a commit that referenced this pull request Feb 3, 2020
For the site integration tests, we have a file of common code which is
used by multiple files in `tests/`.  However, not all functions in
this file are used by all files in `tests/`.

As Cargo compiles each `tests/*.rs` file as a separate crate, this
means that some of these crates end up with unused code.  Rust notices
this and prints a warning.

Let's tell Rust that we don't care about dead code in this file so
that the warning is not printed.
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.

None yet

2 participants