TimelyDataflow / differential-dataflow

An implementation of differential dataflow using timely dataflow on Rust.
MIT License
2.54k stars 183 forks source link

Remove Deref bounds from containers #416

Closed frankmcsherry closed 9 months ago

frankmcsherry commented 10 months ago

This PR replaces a pervasive Deref bound on containers with index and len methods, and reworks copy_slice into copy_range. Now that I type it, we could probably keep copy_slice, as implementing it is not hard (rather dereferencing to form the input slice).

Ideally we would use std::ops::Index but this makes life terrible when we elsewhere write container[..] or the like to get a slice, and instead run afoul of .. not being a usize for the Index implementation. Perhaps this could be cleaned up and made more pleasant before landing.

cc: @antiguru