-
Notifications
You must be signed in to change notification settings - Fork 31
Tidy up *dev status methods more #410
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
Conversation
312b776
to
5298003
Compare
Should do a sanity check test for newly parsed thinpool status value. |
5298003
to
fc9ac7b
Compare
rebased. |
89ca332
to
0e782ae
Compare
Uggg. I think I might have missed a spot. EDIT: Nope. That was in param parsing, not status parsing. |
format!( | ||
"Insufficient number of fields for status; requires at least {}, found {}", | ||
number_required, length | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be valuable from a debugging standpoint to include the status_line value in the error message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would certainly be more complete.
It is better to have the implementation associated with the structure that it builds rather than buried in the larger method. Also, this method of getting something from a str is the expected way. Signed-off-by: mulhern <amulhern@redhat.com>
Eliminate the assertion and substitute an error return instead. Signed-off-by: mulhern <amulhern@redhat.com>
The method no longer panics if there is an error parsing the status value. Signed-off-by: mulhern <amulhern@redhat.com>
It has been omitted until now, because it seemed unclear how to parse it. But it seems clearer now. Also, get rid of an obsoleted comment. Signed-off-by: mulhern <amulhern@redhat.com>
This eliminates some unnecessary code duplication and fixes a copy-paste bug. Signed-off-by: mulhern <amulhern@redhat.com>
It could be helpful. Signed-off-by: mulhern <amulhern@redhat.com>
0e782ae
to
e890b58
Compare
Superceded by #417. |
The objects of this PR are:
This is a continuation of #387 and really resolves #221.