-
-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Impl reader+writer seek #360
Conversation
Benchmark for c05f1baClick to view benchmark
|
9e6aca1
to
bf6defb
Compare
b32ef5d
to
934b42c
Compare
1d23236
to
c0f9fd4
Compare
c0f9fd4
to
cc12d18
Compare
076064b
to
ad7fa88
Compare
Benchmark for f9655f8Click to view benchmark
|
7297dc4
to
26c00d3
Compare
ad7fa88
to
196e5e3
Compare
Benchmark for 84fd5f3Click to view benchmark
|
16aef36
to
3bb6e31
Compare
e9143bb
to
0138356
Compare
Benchmark for e6c5a67Click to view benchmark
|
This would be pretty useful in my project. Anything I can assist with to get this merged? |
We need no-std-io/no-std-io#5 and a final review by me and @sharksforarms |
2b70699
to
302a523
Compare
Decided to just fork that repo and use my own |
* Use fork since no-std-io/no-std-io#5 was not getting merged in a timely fashion. This fork is maintained by myself.
51e6328
to
e647d63
Compare
Benchmark for 830408cClick to view benchmark
|
Benchmark for fe7abffClick to view benchmark
|
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! This is great. This got me thinking, it would be pretty cool if there was a way to add attributes like this without adding bounds to the generic, such that "seek_" could only be used if T
is Seek
, else it would be a compile error. This way, we don't impose more bounds than necessary?
The downside of this PR is that now types are now required to be Seek
(maybe less of a concern with the reader interface... but I can for-see some folks not liking this, maybe?)
I'm not sure about any solutions that includes generic bounds, I think you'll always need to have the friends at |
* Add Seek requirement to Reader * Add basic seek attributes * Add reader.as_mut() * Add seek_rewind, seek_from_end, and seek_from_start * Add seek docs * Add to changelog * Add seek_rewind docs * Add compile test for seek conflict * Add Seek to writer * Update to using fork of no_std_io, no_std_io2 * Use fork since no-std-io/no-std-io#5 was not getting merged in a timely fashion. This fork is maintained by myself. * Move changelog entry to top
* Add Seek requirement to Reader * Add basic seek attributes * Add reader.as_mut() * Add seek_rewind, seek_from_end, and seek_from_start * Add seek docs * Add to changelog * Add seek_rewind docs * Add compile test for seek conflict * Add Seek to writer * Update to using fork of no_std_io, no_std_io2 * Use fork since no-std-io/no-std-io#5 was not getting merged in a timely fashion. This fork is maintained by myself. * Move changelog entry to top
Ah! Indeed. It was likely enough of a pain point to include something in the library. |
Seek
toReader
andWriter
as_mut
toReader
, and testsseek_rewind
,seek_from_current
,seek_from_end
,seek_from_start
,See #105
Currently being used in https://github.com/wcampbell0x2a/cpio-deku