Commit Graph

5 Commits

Author SHA1 Message Date
bluss 57e140065f FIX: Minor code style change in the char module
Just use the simple inherent pointer methods here.
2021-03-29 17:31:37 +02:00
Ralf Jung b7fd8d6a22 enable another unwinding test in Miri 2019-12-07 12:13:31 +01:00
Ralf Jung 9ed6941a51 run miri on CI 2019-11-16 09:52:18 +01:00
bluss 090a5c50cb FIX: Support uninitalized data in encode_utf8, and update try_push
We were using &mut [u8] in encode_utf8, but this is not right according
to the developing unsafe coding guidelines. We need to use raw pointers
to write to possibly uninit memory.

We use a raw pointer form for encode_utf8. It was first attempted to
encapsulate the trusted-to-be-valid raw pointer in a simple { *mut u8,
usize } struct, but the current way of passing ptr and len separately
was the only way to not regress performance.

This impl maintains the same performance in arraystring benches.

Add exhaustive-style tests for encode_utf8
2019-10-09 12:23:44 +02:00
bluss 456aeaf557 FEAT: Remove odds dependency in arrayvec
Copy the encode_utf8 function from odds. std encode_utf8 requires Rust
1.15 and has a different signature, this one seems to fit us better.
2017-10-27 22:31:49 +02:00