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

Have device_identifiers() return a struct instead of a tuple #1794

Closed
mulkieran opened this issue Jan 29, 2020 · 6 comments · Fixed by #1826
Closed

Have device_identifiers() return a struct instead of a tuple #1794

mulkieran opened this issue Jan 29, 2020 · 6 comments · Fixed by #1826
Assignees
Labels
sub-issue issue that has a parent

Comments

@mulkieran
Copy link
Member

The struct should have two fields for the two identifiers and I don't think it needs any impl.

It can be used in the definition of the StaticHeader struct and also used in the result type of functions that call device_identifiers().

This should reduce type complexity and eliminate confusion in a few places.

It should wait until I've gotten in the PR that eliminates the device.rs module that defines DevOwnership, though, because that'll get rid of some invocations of device_identifiers.

@mulkieran
Copy link
Member Author

Call it StratisIdentifiers and define it in static_header.rs? Start out by just defining the method device_identifiers so that it returns StratisResult<Option<StratisIdentifiers>> and then do the right thing wherever that method is used.

@mulkieran
Copy link
Member Author

Best to not touch until #1809 gets in.

@mulkieran
Copy link
Member Author

@GuillaumeGomez, I think this would be a good one, but we'ld like to get #1809 merged first.

@GuillaumeGomez
Copy link
Contributor

Sounds good to me. Please ping me once #1809 is merged.

@mulkieran mulkieran removed the blocked label Feb 11, 2020
@mulkieran
Copy link
Member Author

@GuillaumeGomez Please feel free to begin at any time.

@GuillaumeGomez
Copy link
Contributor

Ok!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sub-issue issue that has a parent
Projects
None yet
2 participants