Commit graph

21 commits

Author SHA1 Message Date
Chris Morgan
8f041216ba Tweak docs, especially around safety
No semantic changes.
2022-01-26 00:16:15 +11:00
Chris Morgan
7866ca8d77 Make TypeIdHasher safe, bump MSRV
Wait a few years and nice things stabilise!

• u64::from_ne_bytes([u8; 8]) is stable in 1.32.0
• TryFrom<&[u8]> for [u8; 8] is stable in 1.34.0

(There are other things I’m touching today that also require a more mild
MSRV bump, but this is the most I *need* at this time.)
2022-01-26 00:16:15 +11:00
Chris Morgan
bf29e608d9 No more bare trait objects: use dyn Trait syntax 2022-01-26 00:16:15 +11:00
Chris Morgan
8abad057b0 Revert "removed unsafe code in favor of explicit assert"
This reverts commit 479d756c99.

There’s nothing wrong with this patch, but I had never pulled this
commit to my local repository and had completely forgotten about it, and
today removed the unsafe code in a *different* direction that I like
better (`bytes.try_into().map(|bytes| u64::from_ne_bytes(bytes))`), so
reverting it so I can cleanly rebase is just easier for me!
2022-01-26 00:12:16 +11:00
Marcel Hellwig
479d756c99 removed unsafe code in favor of explicit assert 2018-11-13 11:27:14 +01:00
Chris Morgan
0850f5ec36 Implement Default on Map
It was implemented on RawMap, and I’m not sure quite why it wasn’t
implemented on Map. I can’t think of any reason *not* to, though, so we
might as well.

Closes #30. Thanks to Maxwell Koo <mjkoo90@gmail.com> for the fix.
2017-10-02 14:32:51 +11:00
Chris Morgan
34028c35e7 Make clippy happy. 2017-01-20 18:10:55 +05:30
Chris Morgan
b549457d62 Put in a bunch of #[inline] attributes on fns.
Somewhere along the path I didn’t mark some functions as `#[inline]`
which they should probably be.

Small but visible benchmark improvements, but within ε so low
confidence.
2016-06-11 13:30:33 +10:00
Chris Morgan
f38113a9cf Make Clippy happy. 2016-04-18 15:00:43 +10:00
Chris Morgan
f63062acc6 Keep Clippy happy. 2016-03-07 00:13:47 +11:00
Chris Morgan
724f94758d Fix order of ptr::copy_nonoverlapping parameters.
Clippy helped me spot this. It didn’t cause any bugs, just bad
performance as all keys would hash to 0 and thus end up in the same
bucket.
2016-03-07 00:11:37 +11:00
Chris Morgan
548ee2a5f2 Ungate drain iterator (stable in Rust 1.6.0). 2016-03-05 12:58:49 +11:00
Chris Morgan
6d0a64dcc9 Ungate efficient hashing (stable in Rust 1.7.0). 2016-03-05 12:58:19 +11:00
Chris Morgan
82f41caeb9 0.11.2: just fixing warnings and such. 2016-01-22 12:05:51 +11:00
Chris Morgan
035fb94cd2 Rename 'nightly' feature to 'unstable'. 2015-06-10 09:02:10 +10:00
Chris Morgan
7606e75aa4 Replace Cargo features with arcane DST magicks.
(It was a toss-up between “arcane” and “eldritch” there; “arcane” won
this time. “Eldritch”, maybe you can be it next time.)
2015-06-10 09:02:10 +10:00
Chris Morgan
fdba2f45b9 Implement stuff for concurrency.
This took some refactoring too for best effect.
2015-06-10 09:02:10 +10:00
Chris Morgan
18518214c4 0.10.3: Rust beta support
This is accomplished at a certain loss of efficiency, sadly.

Add the 'nightly' feature to get things back how they were.
2015-04-18 10:54:26 +10:00
Chris Morgan
c6480a9172 0.10.0: move Clone functionality into a feature.
No more separate Git branch for it; Cargo features fit the bill well.
2015-03-27 11:05:12 +11:00
Chris Morgan
97ec79029f Rust update. 2015-03-25 17:59:11 +11:00
Chris Morgan
143ee06268 Substantial refactoring, exposing a raw interface.
This is not necessarily the final form, but I think it’s pretty good.
The only alteration to the public interface is the removal of the
iteration methods from `AnyMap`; they are now attached to `RawAnyMap`.

The diff appears considerably more scary than it is in actual fact due
to some comparatively unnecessary changes like the field name (from
`data` to `raw`). Really, it’s minimal.
2015-03-24 13:42:01 +11:00