-
Notifications
You must be signed in to change notification settings - Fork 2
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
Small things #37
Small things #37
Conversation
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.
Mostly good, some nit, and I would rather we not remove the RelativePathError without good cause. Sure, reducing the number of errors is nice, but OpcUaError
might quickly grow very large if we include all possible error modes from all possible functions in it. It's probably better for the future to have individual error enums where it makes sense, then just include those in OpcUaError
. Doing so is easy with thiserror anyway.
@@ -340,21 +382,6 @@ impl RelativePathElement { | |||
} | |||
} | |||
|
|||
#[derive(Debug, Clone)] | |||
/// Error returned from parsing a relative path. | |||
pub enum RelativePathError { |
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.
Could you, instead of removing this error, just imlement From<RelativePathError> for OpcUaError
? I don't see a good reason to flatten the error now.
Do feel free to derive Error
on RelativePathError
, just using the docstrings as error messages.
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.
yes might be. I was unsure what the correct approach is here. I just proposed something.
And yes maybe From<RelativePathError> for OpcUaError
is a good solution.
I will change that
d304b29
to
56786bc
Compare
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 be nice to include the actual content of the error in the messages, maybe?
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.
LGTM!
No description provided.