You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* remove transmute and fix rust warning
while `()` is a ZST the potentially dangling reference is still
undefined behaviour. Making it a static is a trivial fix.
Signed-off-by: Petros Angelatos <[email protected]>
* trace: define `BatchReader` with associated types
The `TraceReader` trait uses associated types to define its `Key`,
`Val`, `Time`, `Diff` but the `BatchReader` trait did not, even though
they are very similar in nature. Usually the choice between asssociated
types or generic parameters on a trait is determined by whether or not a
particular type is expected to implement the same trait multiple times.
My starting point was that these two trait should at the very least be
consistent with respect to their structure and either both use generic
parameters or both use associated types.
All the uses in this repo (and also that I can imagine being useful)
don't really need `BatchReader` to be polymorphic for a particular type
and so I chose to change that one to make it consistent with
`TraceReader`.
The result is quite pleasing as in many cases a lot of generic
parameters are erased.
In order to keep this PR short I left the `Cursor` trait untouched, but
I believe a similar transformation would be beneficial there too,
simplifying further many type signatures.
Signed-off-by: Petros Angelatos <[email protected]>
* trace: redefine Cursor with associated types
Signed-off-by: Petros Angelatos <[email protected]>
* remove transmute and fix rust warning
while `()` is a ZST the potentially dangling reference is still
undefined behaviour. Making it a static is a trivial fix.
Signed-off-by: Petros Angelatos <[email protected]>
* simplify generics of batch related traits
* simplify generics of join's deferred struct
* merge CursorDebug trait methods into Cursor
* various code style changes
Co-authored-by: Frank McSherry <[email protected]>
0 commit comments