Skip to content

Put str_id macro into a separate module#428

Merged
mergify[bot] merged 3 commits intostratis-storage:masterfrom
mulkieran:master-ids
Mar 1, 2019
Merged

Put str_id macro into a separate module#428
mergify[bot] merged 3 commits intostratis-storage:masterfrom
mulkieran:master-ids

Conversation

@mulkieran
Copy link
Copy Markdown
Member

@mulkieran mulkieran commented Feb 26, 2019

For better modularity.

@mulkieran mulkieran self-assigned this Feb 26, 2019
@mulkieran mulkieran force-pushed the master-ids branch 5 times, most recently from ea252ea to ada5a65 Compare February 26, 2019 16:44
For better modularity.

Signed-off-by: mulhern <amulhern@redhat.com>
No longer pass as an argument to str_id macro. I think str_check was defined
originally as a function because we were novice macro users. That function
was always passed for construction of the type, it was used exclusively for
that purpose, and it seems unlikely that it will need to be varied.

Have str_check just evaluate to an Option<String> rather than a Result.
Promote the Option to the error in str_id. Removes duplication and
isolates the use of the DmResult type to two places.

Signed-off-by: mulhern <amulhern@redhat.com>
So that the tests are near the things they test.

Signed-off-by: mulhern <amulhern@redhat.com>
@mergify mergify Bot merged commit 7d534a5 into stratis-storage:master Mar 1, 2019
@mulkieran mulkieran deleted the master-ids branch March 1, 2019 15:27
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