-
Notifications
You must be signed in to change notification settings - Fork 236
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
Introduce dedicated Text
type for DeEvent::Text
event
#572
Conversation
This type would be useful when span support would be added or to implement configurable stripping leading / trailing spaces
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #572 +/- ##
==========================================
- Coverage 64.21% 63.99% -0.22%
==========================================
Files 33 33
Lines 16583 16517 -66
==========================================
- Hits 10648 10570 -78
- Misses 5935 5947 +12
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
End(BytesEnd::new("inner")), | ||
] | ||
); | ||
assert_eq!(de.write, vec![]); | ||
assert_eq!(de.next().unwrap(), Text(Cow::Borrowed("text"))); | ||
assert_eq!(de.next().unwrap(), Text("text".into())); |
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.
I'm assuming we don't care whether it was borrowed or owned? (not that this aspect is being properly tested currently)
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, we don't care. Only the fact that Text
event is generated is tested here
The new type would be useful in corrent implementation of #561 and #552, because introduces a place for additional data (a range of text that we should get after trim (assumed that Text would contain untrimmed text) and a span of a text)