-
Notifications
You must be signed in to change notification settings - Fork 246
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
refactor(base): Remove impl From
for SyncTimelineEvent
#4146
Conversation
143a27c
to
4abeb17
Compare
@@ -183,15 +183,15 @@ impl TestTimeline { | |||
C: RedactedMessageLikeEventContent, | |||
{ | |||
let ev = self.event_builder.make_sync_redacted_message_event(sender, content); | |||
self.handle_live_event(Raw::new(&ev).unwrap().cast()).await; |
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.
given that ev
was already a Raw<AnySyncTimelineEvent>
, I don't know what the whole Raw::new(&ev).unwrap().cast()
was supposed to achieve here. I think we can just get rid of it.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4146 +/- ##
==========================================
- Coverage 84.76% 84.73% -0.04%
==========================================
Files 269 269
Lines 28848 28841 -7
==========================================
- Hits 24453 24437 -16
- Misses 4395 4404 +9 ☔ View full report in Codecov by Sentry. |
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.
Thanks!
I feel like the ability to convert straight from a `Raw<AnySyncTimelineEvent>>` into a `SyncTimelineEvent` is somewhat over-simplified: the two are only occasionally equivalent, and it's better to be explicit. Changelog: `SyncTimelineEvent` no longer implements `From<Raw<AnySyncTimelineEvent>>`.
e1b250a
to
b2d3897
Compare
I feel like the ability to convert straight from a
Raw<AnySyncTimelineEvent>>
into aSyncTimelineEvent
is somewhat over-simplified: the two are only occasionally equivalent, and it's better to be explicit.