Skip to content

Conversation

sirhcel
Copy link
Member

@sirhcel sirhcel commented Sep 19, 2025

There is already as_slice() which gives access to the underlying backing array where the elements are not in the order of writing.

With automatic dereferencing, functions like iter() or windows() are automatically available for HistoryBuf instances and are returning items in an order which does not reflect the write order and will likely surprise users which did not carefully read all the documentation for HistoryBuf like me.

@sirhcel sirhcel force-pushed the historybuf-no-deref branch from 6a380a4 to 19a455f Compare September 19, 2025 12:39
There is already `as_slice()` which gives access to the underlying
backing array where the elements are not in the order of writing.

With automatic dereferencing, functions like `iter()` or `windows()` are
automatically available for `HistoryBuf` and are returning items in an
order which does not reflect the write order and will likely surprise
users which did not carefully read all the documentation on for
`HistoryBuf` like me.
@sirhcel
Copy link
Member Author

sirhcel commented Sep 19, 2025

There is more potential for streamlining the interface of HistoryBuf and #611 sets out to tackle these.

@jamesmunns
Copy link
Member

Probably worth noting this is a breaking change, as removal of the Deref impl is semver relevant.

@sgued sgued added the API Break Breaking changes label Sep 19, 2025
@sgued
Copy link
Contributor

sgued commented Sep 19, 2025

LGTM. This is a breaking change that should be included in the next breaking change release. Added as sub-issue: #613

@sgued sgued mentioned this pull request Sep 19, 2025
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Break Breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants