Taiki Endo and GitHub
b89247c713
Update loom to 0.5 ( #494 )
2021-04-13 23:58:18 +09:00
Noah and GitHub
9c770188fd
Fully inline BytesMut::new ( #493 )
2021-04-11 05:49:33 +09:00
Stepan Koltsov and GitHub
b9eade12a5
Specialize copy_to_bytes for Chain and Take ( #481 )
...
Avoid allocation when `Take` or `Chain` is composed of `Bytes`
objects.
This works now for `Take`.
`Chain` it works if the requested bytes does not cross boundary
between `Chain` members.
2021-04-11 03:56:35 +09:00
Dan Burkert and GitHub
3d5624a452
Add inline tags to UninitSlice methods ( #443 )
...
This appears to be the primary cause of significant performance
regressions in the `prost` test suite in the 0.5 to 0.6 transition. See
danburkert/prost#381 .
2021-04-11 03:19:30 +09:00
Stepan Koltsov and GitHub
2428c152a6
Panic on integer overflow in Chain::remaining ( #482 )
...
Make it safer.
2021-02-16 12:44:33 -08:00
Zettroke and GitHub
268f6f80b4
override put_slice for &mut [u8] ( #483 )
2021-02-15 16:35:01 -08:00
Alice Ryhl and GitHub
e4182808df
Make bytes_mut -> chunk_mut rename more easily discoverable ( #471 )
2021-01-23 15:22:43 +09:00
Christopher Bunn and GitHub
8daf43e9bd
docs: fix broken Take link ( #466 )
2021-01-20 14:39:23 +09:00
Alice Ryhl and GitHub
7b18c1c076
prepare 1.0.1 release ( #460 )
v1.0.1
2021-01-11 18:07:46 +01:00
Ralf Jung and GitHub
df20a68356
use Box::into_raw instead of mem-forget-in-disguise ( #458 )
2020-12-31 15:07:28 +01:00
laizy and GitHub
8758a1aba5
add inline for Vec::put_slice ( #459 )
2020-12-31 12:34:39 +01:00
Ralf Jung and GitHub
27a0f9ca6e
CI: run test suite in Miri ( #456 )
2020-12-29 22:54:48 +01:00
Alice Ryhl and GitHub
ed71a7beb3
Fix deprecation warning ( #457 )
2020-12-29 22:46:39 +01:00
Carl Lerche and GitHub
064ad9a1a0
chore: prepare v1.0.0 release ( #453 )
v1.0.0
2020-12-22 15:30:20 -08:00
Taiki Endo and GitHub
ed1d194660
deps: update loom to 0.4 ( #452 )
2020-12-22 10:30:50 +01:00
Arve Knudsen and GitHub
e398b0a209
Update readme / changelog ( #451 )
2020-12-20 07:31:22 -08:00
Carl Lerche and GitHub
06907f3e7b
Rename Buf/BufMut, methods to chunk/chunk_mut ( #450 )
...
The `bytes()` / `bytes_mut()` name implies the method returns the full
set of bytes represented by `Buf`/`BufMut`. To rectify this, the methods
are renamed to `chunk()` and `chunk_mut()` to reflect the partial nature
of the returned byte slice.
`bytes_vectored()` is renamed `chunks_vectored()`.
Closes #447
2020-12-18 11:04:31 -08:00
Carl Lerche and GitHub
54f5ced6c5
remove unused Buf implementation. ( #449 )
...
The implementation of `Buf` for `Option<[u8; 1]>` was added to support
`IntoBuf`. The `IntoBuf` trait has since been removed.
Closes #444
2020-12-16 21:51:13 -08:00
Carl Lerche and GitHub
bd78f19393
chore: prepare for v1.0.0 work ( #448 )
2020-12-12 08:25:14 -08:00
Ibraheem Ahmed and GitHub
39c6d7a512
Upgrade bytes version from 0.5 to 0.6.0 in README ( #441 )
2020-11-02 00:10:51 +09:00
Carl Lerche and GitHub
b7f75829ab
prepare v0.6.0 release ( #440 )
v0.6.0
2020-10-20 16:08:25 -07:00
Carl Lerche and GitHub
39de065a1e
Add Buf::copy_to_bytes(len) ( #439 )
...
This method replaces `Buf::to_bytes()`, providing a method that copies a
subset of the remaining buffer into a `Bytes` value. As this is strictly
more flexible, `to_bytes()` is removed.
Fixes : #129 , #398
2020-10-20 11:00:35 -07:00
Carl Lerche and GitHub
5866839e45
use checked addition with range ( #438 )
2020-10-20 10:26:38 -07:00
Carl Lerche and GitHub
e0d8413d53
Switch BufMut::bytes_mut to&mut UninitSlice ( #433 )
...
The way BufMut uses MaybeUninit can lead to unsoundness. This replaces
MaybeUnit with a type owned by bytes so we can ensure the usage patterns
are sound.
Refs: #328
2020-10-19 15:48:23 -07:00
Matthias Einwag and GitHub
5a11c783ec
De-emphasize Arc implementation in Bytes description ( #436 )
...
The previous description focussed a lot on the `Arc` based implementation
of `Bytes`. Given the vtable based implemetation, this is however not the
only valid implementation. This changes the description a bit in order
to de-emaphasize the `Arc` part, and to describe that other implementations
are possible.
This should also be necessary if the vtable gets public.
2020-10-19 12:32:20 -07:00
Carl Lerche and GitHub
4724c7e8a0
remove new fns from combinator structs ( #434 )
...
This is not idiomatic.
2020-10-18 09:55:19 -07:00
Carl Lerche and GitHub
ced050730c
Make BufMut an unsafe trait ( #432 )
...
Users of `BufMut` are unable to defend against incorrect implementations
of `BufMut`, this makes the trait unsafe to implement.
Fixes #329
2020-10-16 15:45:38 -07:00
Carl Lerche and GitHub
94c543f74b
remove ext traits ( #431 )
2020-10-16 15:16:23 -07:00
Carl Lerche and GitHub
447530b8a6
Remove BufMut::bytes_vectored_mut() ( #430 )
...
There are issues with regard to uninitialized memory. We are avoiding
stabilizing this function for now.
2020-10-16 11:56:03 -07:00
Carl Lerche and GitHub
422048eb24
prepare for 0.6 work ( #428 )
2020-10-16 11:49:27 -07:00
Sean McArthur
6fdb7391ce
v0.5.6
v0.5.6
2020-07-13 17:58:36 -07:00
Sean McArthur and GitHub
025bec2954
Move loom to dev-dependencies ( #416 )
2020-07-13 16:55:47 -07:00
Taiki Endo and GitHub
2d51809bd7
Fix CI failure on Windows ( #415 )
...
--no-self-update is necessary because the windows environment cannot
self-update rustup.exe.
2020-07-13 12:33:30 +09:00
Taiki Endo and GitHub
7daa7fe053
Change default lint level to warning and deny warnings in CI ( #397 )
2020-07-09 09:12:39 -07:00
Sean Leather and GitHub
972f538b7e
docs: Clarify what BytesMut is ( #375 )
2020-07-09 09:11:45 -07:00
Bryan Donlan and Sean McArthur
81550da474
BytesMut: Reuse buffer when data fully consumed via Buf
...
Closes #412
2020-07-08 15:28:36 -07:00
Tomasz Miąsko and GitHub
90e7e650c9
Use ThreadSanitizer CI setup that avoids false positives ( #406 )
2020-07-07 01:28:47 +09:00
Juan Aguilar and GitHub
bc4a6d56f4
Add inline attribute to BytesMut::as_mut ( #410 )
2020-07-05 17:43:26 -07:00
Juan Aguilar and GitHub
3603cec7c2
Add inline attribute to BytesMut::set_len ( #408 )
2020-07-03 16:47:32 -07:00
Tomasz Miąsko and GitHub
5cde647c29
Remove unnecessary synchronization when cloning shared representation ( #404 )
2020-07-02 18:55:16 -07:00
Sean McArthur
008d3e508e
v0.5.5
v0.5.5
2020-06-18 14:30:11 -07:00
Mikhail Zabaluev and GitHub
a3304e8b8b
Remove outdated info on BytesMut::with_capacity ( #394 )
...
Remove a remark from the doc that pertained to the inline
layout and is no longer true.
2020-05-27 22:02:45 -07:00
Taiki Endo and GitHub
64fe7e10ab
Migrate CI to GitHub Actions ( #392 )
2020-05-25 01:41:45 +09:00
Taiki Endo and GitHub
e9877e7a3d
Deny warnings for doc tests ( #391 )
2020-05-24 06:30:50 +09:00
Kirill Fomichev and GitHub
08ec01d1e7
Fix reference in Take docs ( #383 )
2020-05-22 14:33:06 +09:00
Taiki Endo and GitHub
1fbf83816b
Format with rustfmt ( #389 )
...
* Format with rustfmt
* Add rustfmt check to CI
2020-05-22 13:17:30 +09:00
Sean McArthur and GitHub
5e93fa4c6b
Update to loom v0.3 ( #381 )
2020-05-22 11:23:22 +09:00
Cheng XU and GitHub
9f40abc12a
Allow using serde feature in no_std environment ( #385 )
...
When `serde` is used, it would enable its default feature `std`.
This of course breaks no_std build.
Fix this by disabling serde's default features. This should work for
both serde + std and serde + no_std case.
2020-05-22 11:19:46 +09:00
Cheng XU and GitHub
e8fa2511ff
Fix tests for no_std build ( #384 )
...
This fixes `cargo test --no-default-features`.
2020-05-22 11:18:20 +09:00
Taiki Endo and GitHub
fa464ca483
Fix CI failure on MacOS ( #388 )
...
macOS-10.13 has been removed.
2020-05-22 10:54:52 +09:00