-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: use Into
trait for Valid::trace
#23
Conversation
where | ||
T: Clone, | ||
{ | ||
fn trace(self, trace: impl Into<T> + Clone) -> Valid<A, E, T> { |
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.
fn trace(self, trace: impl Into<T> + Clone) -> Valid<A, E, T> { | |
fn trace(self, trace: impl Into<T>) -> Valid<A, E, T> { |
We shouldn't put a hard constraint on the type T to implement Clone.
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.
Nevermind.
src/valid.rs
Outdated
.trace("C".into()); | ||
.trace("A".to_string()) | ||
.trace("B".to_string()) | ||
.trace("C".to_string()); |
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.
.trace("C".to_string()); | |
.trace("C"); |
Should not be required I suppose.
Into
trait for Valid::trace
More flexible way to pass trace data