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

Move DmFlags definition into separate module #287

Merged
merged 1 commit into from
Mar 16, 2018

Conversation

mulkieran
Copy link
Member

@mulkieran mulkieran commented Mar 15, 2018

No description provided.

@trgill trgill requested a review from agrover March 15, 2018 20:10
@mulkieran
Copy link
Member Author

clippy failure.

@mulkieran
Copy link
Member Author

@agrover review, please?

@mulkieran
Copy link
Member Author

clippy should pass this time.

@mulkieran
Copy link
Member Author

And it does! @agrover review, please?

Copy link
Contributor

@agrover agrover left a comment

Choose a reason for hiding this comment

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

just a few questions around allow()s and a comment block

src/dm.rs Outdated
@@ -6,8 +6,6 @@
// Their scope is the whole file because the bitflags! macro generates a
// lot of stuff, and so placing the annotation right on the use of the
// bitflags! macro does not actually cover the suspicious code generated.
#![allow(redundant_field_names)]
Copy link
Contributor

Choose a reason for hiding this comment

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

the preceding comment is copied in the new file, can it be removed from here?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes.

src/dm_flags.rs Outdated
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

// These errors originate in bitflags! macro and are not ours to fix.
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these clippy errors or regular rustc errors? Just curious. Might be nice to say.

Copy link
Contributor

Choose a reason for hiding this comment

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

Still an issue with most recent bitflags crate?

Copy link
Member Author

Choose a reason for hiding this comment

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

The most recent bitflags crate hasn't changed since these clippy errors were added.

Copy link
Member Author

Choose a reason for hiding this comment

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

These must be clippy errors, because we use clippy annotations to ignore them.

Copy link
Member Author

Choose a reason for hiding this comment

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

clippy has changed, though, so it may be possible to remove a lint or two: bitflags/bitflags#149. I'm going to give it a try.

To make dm module a bit shorter.
To avoid a circular dependency between deviceinfo and dm modules. Rust
supports circular dependencies, obviously, but too many is a sign of poor
modularity.
Remove the clippy lints, since the recent version of clippy doesn't warn
anymore.

Signed-off-by: mulhern <amulhern@redhat.com>
@mulkieran
Copy link
Member Author

@agrover review? Turns out clippy change means those two lints aren't triggered by bitflags! generated code, so the whole clippy thing can go away.

@mulkieran mulkieran merged commit 49530bb into stratis-storage:master Mar 16, 2018
@mulkieran mulkieran deleted the master-dm-flags branch March 16, 2018 20:30
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.

3 participants