Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from tokio-rs:master #3

Open
wants to merge 175 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
8bbe9dd
Fix #352 -- Make freeze respect the start offset for BytesMuts in Vec…
TimHambourger Mar 13, 2020
b4ebe84
Fix #354 -- Make advance_mut impl of BufMut for Vec<u8> panic if cnt …
TimHambourger Mar 13, 2020
fa464ca
Fix CI failure on MacOS (#388)
taiki-e May 22, 2020
e8fa251
Fix tests for no_std build (#384)
xu-cheng May 22, 2020
9f40abc
Allow using serde feature in no_std environment (#385)
xu-cheng May 22, 2020
5e93fa4
Update to loom v0.3 (#381)
seanmonstar May 22, 2020
1fbf838
Format with rustfmt (#389)
taiki-e May 22, 2020
08ec01d
Fix reference in Take docs (#383)
fanatid May 22, 2020
e9877e7
Deny warnings for doc tests (#391)
taiki-e May 23, 2020
64fe7e1
Migrate CI to GitHub Actions (#392)
taiki-e May 24, 2020
a3304e8
Remove outdated info on BytesMut::with_capacity (#394)
mzabaluev May 28, 2020
008d3e5
v0.5.5
seanmonstar Jun 18, 2020
5cde647
Remove unnecessary synchronization when cloning shared representation…
tmiasko Jul 3, 2020
3603cec
Add inline attribute to BytesMut::set_len (#408)
zzau13 Jul 3, 2020
bc4a6d5
Add inline attribute to BytesMut::as_mut (#410)
zzau13 Jul 6, 2020
90e7e65
Use ThreadSanitizer CI setup that avoids false positives (#406)
tmiasko Jul 6, 2020
81550da
BytesMut: Reuse buffer when data fully consumed via Buf
Jul 8, 2020
972f538
docs: Clarify what BytesMut is (#375)
spl Jul 9, 2020
7daa7fe
Change default lint level to warning and deny warnings in CI (#397)
taiki-e Jul 9, 2020
2d51809
Fix CI failure on Windows (#415)
taiki-e Jul 13, 2020
025bec2
Move loom to dev-dependencies (#416)
seanmonstar Jul 13, 2020
6fdb739
v0.5.6
seanmonstar Jul 14, 2020
422048e
prepare for 0.6 work (#428)
carllerche Oct 16, 2020
447530b
Remove BufMut::bytes_vectored_mut() (#430)
carllerche Oct 16, 2020
94c543f
remove ext traits (#431)
carllerche Oct 16, 2020
ced0507
Make BufMut an unsafe trait (#432)
carllerche Oct 16, 2020
4724c7e
remove `new` fns from combinator structs (#434)
carllerche Oct 18, 2020
5a11c78
De-emphasize `Arc` implementation in `Bytes` description (#436)
Matthias247 Oct 19, 2020
e0d8413
Switch `BufMut::bytes_mut` to`&mut UninitSlice` (#433)
carllerche Oct 19, 2020
5866839
use checked addition with range (#438)
carllerche Oct 20, 2020
39de065
Add `Buf::copy_to_bytes(len)` (#439)
carllerche Oct 20, 2020
b7f7582
prepare v0.6.0 release (#440)
carllerche Oct 20, 2020
39c6d7a
Upgrade bytes version from 0.5 to 0.6.0 in README (#441)
ibraheemdev Nov 1, 2020
bd78f19
chore: prepare for v1.0.0 work (#448)
carllerche Dec 12, 2020
54f5ced
remove unused Buf implementation. (#449)
carllerche Dec 17, 2020
06907f3
Rename Buf/BufMut, methods to chunk/chunk_mut (#450)
carllerche Dec 18, 2020
e398b0a
Update readme / changelog (#451)
aknuds1 Dec 20, 2020
ed1d194
deps: update loom to 0.4 (#452)
taiki-e Dec 22, 2020
064ad9a
chore: prepare v1.0.0 release (#453)
carllerche Dec 22, 2020
ed71a7b
Fix deprecation warning (#457)
Darksonn Dec 29, 2020
27a0f9c
CI: run test suite in Miri (#456)
RalfJung Dec 29, 2020
8758a1a
add inline for Vec::put_slice (#459)
laizy Dec 31, 2020
df20a68
use Box::into_raw instead of mem-forget-in-disguise (#458)
RalfJung Dec 31, 2020
7b18c1c
prepare 1.0.1 release (#460)
Darksonn Jan 11, 2021
8daf43e
docs: fix broken Take link (#466)
mypetyak Jan 20, 2021
e418280
Make bytes_mut -> chunk_mut rename more easily discoverable (#471)
Darksonn Jan 23, 2021
268f6f8
override put_slice for &mut [u8] (#483)
Zettroke Feb 16, 2021
2428c15
Panic on integer overflow in Chain::remaining (#482)
stepancheg Feb 16, 2021
3d5624a
Add inline tags to UninitSlice methods (#443)
danburkert Apr 10, 2021
b9eade1
Specialize copy_to_bytes for Chain and Take (#481)
stepancheg Apr 10, 2021
9c77018
Fully inline BytesMut::new (#493)
coolreader18 Apr 10, 2021
b89247c
Update loom to 0.5 (#494)
taiki-e Apr 13, 2021
ed1d24e
Use ubuntu-latest instead of ubuntu-16.04 (#497)
taiki-e May 23, 2021
baaf12d
Keep capacity when unsplit on empty other buf (#502)
Gbillou Jul 5, 2021
f34dc5c
Remove doc URLs (#498)
taiki-e Aug 6, 2021
ab8e3c0
Clarify BufMut allocation guarantees (#501)
Darksonn Aug 7, 2021
fa9cbf1
Clarify BufPut::put_int behavior (#486)
stepancheg Aug 8, 2021
2697fa7
BufMut::put_bytes(self, val, cnt) (#487)
stepancheg Aug 8, 2021
ee24be7
ci: fetch cargo hack from github release (#507)
Darksonn Aug 24, 2021
0e9fa0b
impl From<Box<[u8]>> for Bytes (#504)
ijackson Aug 24, 2021
55e2968
Clarifying actions of clear and truncate. (#508)
chotchki Aug 24, 2021
ebc61e5
chore: prepare bytes v1.1.0 (#509)
Darksonn Aug 25, 2021
ba5c5c9
Appease miri (#515)
Noah-Kennedy Nov 7, 2021
d946ef2
`const`-ify `Bytes::len` and `Bytes::is_empty` (#514)
Cyborus04 Nov 9, 2021
68afb40
Add `BytesMut::zeroed` (#517)
ldm0 Nov 24, 2021
0e3b246
Address various clippy warnings (#528)
robjtede Jan 24, 2022
131dae1
Implement `Extend<Bytes>` for `BytesMut` (#527)
robjtede Jan 24, 2022
88f5e12
update Miri CI config (#534)
RalfJung Mar 9, 2022
d4f5023
Optimize BytesMut::reserve: Reuse vec if possible (#529)
NobodyXu Mar 16, 2022
e4c7236
docs: redraw layout diagram with box drawing characters. (#539)
adeschamps Mar 25, 2022
9e6edd1
Clarify `BytesMut::unsplit` docs (#535)
leshow Apr 6, 2022
7244769
Fix aliasing in Clone by using a raw pointer (#523)
saethlin Apr 6, 2022
547a320
Add TSAN support (#541)
Darksonn Apr 15, 2022
8198f9e
Make strict provenance compatible (#542)
Darksonn Apr 15, 2022
0a2c43a
Fix bugs in `BytesMut::reserve_inner` (#544)
NobodyXu Apr 28, 2022
89061c3
Only avoid pointer casts when using miri
Darksonn Apr 29, 2022
b4b2c18
Revert accidental push directly to master
Darksonn Apr 29, 2022
716a0b1
Only avoid pointer casts when using miri (#545)
Darksonn Apr 29, 2022
0ce4fe3
Update actions/checkout action to v3 (#546)
taiki-e May 1, 2022
b8d27c0
Add `UninitSlice::as_uninit_slice_mut()` (#548)
erickt May 10, 2022
3536017
Fix chain remaining_mut(), allowing to chain growing buffer (#488)
Zettroke Jun 11, 2022
28a1eab
chore: Fix unused warnings (#551)
LucioFranco Jun 23, 2022
f514bd3
miri: don't use int2ptr casts for invalid pointers (#553)
Darksonn Jul 9, 2022
068ed41
Add conversion from BytesMut to Vec<u8> (#543)
NobodyXu Jul 10, 2022
10d1f6e
Fix: `From<BytesMut> fo Vec<u8>` implementation (#554)
NobodyXu Jul 13, 2022
cd188cb
Add conversion from Bytes to Vec<u8> (#547)
NobodyXu Jul 13, 2022
7553a67
Fix amortized asymptotics of `BytesMut` (#555)
NobodyXu Jul 19, 2022
38fd42a
chore: prepare bytes v1.2.0 (#556)
Darksonn Jul 19, 2022
d6e1999
Fix reserve over allocating underlying buffer (#560)
schultetwin1 Jul 30, 2022
b724914
chore: prepare bytes v1.2.1 (#561)
Darksonn Jul 30, 2022
d1b5d4c
Don't have important data in unused capacity when calling reserve (#563)
Darksonn Aug 12, 2022
a36f661
docs: Bytes::new etc should return Self not Bytes (#568)
adamchalmers Aug 24, 2022
6e4b1f2
Rename and expose `BytesMut::spare_capacity_mut` (#572)
yotamofek Oct 4, 2022
5c7b431
Update nightly snapshot to the current one (#577)
Phantomical Nov 14, 2022
8a8c41f
Implement native-endian get and put functions for Buf and BufMut (#576)
Phantomical Nov 14, 2022
9b22722
chore: prepare bytes v1.3.0 (#579)
Phantomical Nov 21, 2022
050d65b
make IntoIter constructor public (#581)
matko Nov 25, 2022
c93a94b
Fix duplicate "the the" typos (#585)
xpromache Dec 20, 2022
f15bba3
Document which functions require `std` (#591)
MrGunflame Jan 31, 2023
05e9d5c
Avoid large reallocations when freezing BytesMut (#592)
bk2204 Jan 31, 2023
21ed332
chore: prepare bytes v1.4.0 (#593)
Darksonn Jan 31, 2023
74b04c7
Mark BytesMut::extend_from_slice as inline (#595)
samanpa Feb 4, 2023
99a2754
Add a safe way to create UninitSlice from slices (#598)
mina86 Feb 9, 2023
b29112c
Implement BufMut for `&mut [MaybeUninit<u8>]` (#597)
mina86 Feb 10, 2023
c7756c3
Fix CI failure (#616)
taiki-e Jun 4, 2023
64c4fa2
Rename UninitSlice constructors for consistency with ReadBuf (#599)
mina86 Jun 20, 2023
74e6e20
chore: prepare bytes v1.5.0 (#627)
Darksonn Sep 7, 2023
bd9c164
doc: fix changelog typo (#628)
Darksonn Sep 7, 2023
a14ef46
Move comment to correct constant (#629)
rukai Sep 11, 2023
a4e16a5
docs: fix some spelling mistakes (#633)
mxsm Sep 25, 2023
fd9243f
Various cleanup (#635)
Darksonn Oct 2, 2023
bde8c50
docs: typo fix (#637)
DanielBauman88 Oct 19, 2023
72cbb92
docs: fix broken links (#639)
kaffarell Nov 16, 2023
f73c6c8
Simplify UninitSlice::as_uninit_slice_mut() logic (#644)
lucab Dec 28, 2023
dbbdb63
Use `self.` instead of `Self::` (#642)
braddunbar Dec 28, 2023
3bf6583
readme: add security policy (#649)
Darksonn Jan 3, 2024
fbc64bc
Update loom to 0.7 (#651)
taiki-e Jan 7, 2024
09214ba
Update CI config (#650)
taiki-e Jan 7, 2024
abb4a2e
BytesMut: Assert alignment of Shared (#652)
braddunbar Jan 19, 2024
0864aea
add `Bytes::is_unique` (#643)
Cyborus04 Jan 19, 2024
0ba3b4c
Remove unnecessary namespace qualifier (#660)
braddunbar Jan 28, 2024
9257a6e
Remove an unnecessary else branch (#662)
braddunbar Jan 28, 2024
e24587d
Remove unreachable else branch (#661)
braddunbar Jan 28, 2024
d2e7abd
refactor: make parameter mut in From<Vec> (#667)
braddunbar Jan 31, 2024
8bcac21
Restore commented tests (#665)
braddunbar Feb 6, 2024
47e8305
Use sub instead of offset (#668)
braddunbar Feb 6, 2024
c6972d6
Calculate original capacity only if necessary (#666)
braddunbar Feb 6, 2024
f586ffc
set_vec_pos does not need a second parameter (#672)
braddunbar Feb 6, 2024
1bcd212
get_vec_pos: use &self instead of &mut self (#670)
braddunbar Feb 6, 2024
4628927
Refactor split_at/split_to (#663)
braddunbar Feb 23, 2024
99584cc
Use Iterator from the prelude (#673)
braddunbar Mar 2, 2024
c5fae00
copy_to_bytes: Add panic section to docs (#676)
braddunbar Mar 3, 2024
7968f6f
Remove redundant reserve call (#674)
braddunbar Mar 4, 2024
ca00411
Remove commented tests for Bytes::unsplit (#677)
braddunbar Mar 4, 2024
536db06
Use ManuallyDrop instead of mem::forget (#675)
braddunbar Mar 14, 2024
ce8d8a0
chore: prepare bytes v1.6.0 (#681)
braddunbar Mar 22, 2024
0d4cc7f
Bytes: Use ManuallyDrop instead of mem::forget (#678)
braddunbar Apr 8, 2024
e4af486
Don't set `len` in `BytesMut::reserve` (#682)
braddunbar Apr 9, 2024
4eb62b9
Bytes::split_to - check fast path first (#689)
braddunbar Apr 10, 2024
b5fbfc3
perf: improve Bytes::copy_to_bytes (#688)
tisonkun Apr 10, 2024
327615e
test(benches): encloses bytes into `test::black_box` for clone benche…
wyfo Apr 11, 2024
4e2c9c0
Truncate tweaks (#694)
braddunbar Apr 17, 2024
9d3ec1c
Resize refactor (#696)
braddunbar Apr 24, 2024
ce09d7d
Bytes::split_off - check fast path first (#693)
braddunbar Apr 24, 2024
baa5053
Reuse capacity when possible in <BytesMut as Buf>::advance impl (#698)
paolobarbolini Apr 25, 2024
a8806c2
Improve BytesMut::split suggestion (#699)
paolobarbolini Apr 25, 2024
cb7f844
Tweak clear and truncate length modifications (#700)
Darksonn Apr 26, 2024
0c17e99
ci: silence unexpected-cfgs warnings due to `#[cfg(loom)]` (#703)
Darksonn May 5, 2024
86694b0
Add zero-copy make_mut (#695)
Sytten May 5, 2024
4950c50
Offset from (#705)
braddunbar May 11, 2024
caf520a
Fix iter tests to use the actual bytes IntoIter instead of std (#707)
paolobarbolini May 19, 2024
fa1daac
Change Bytes::make_mut to impl From<Bytes> for BytesMut (closes #709)…
nox May 28, 2024
7a5154b
Clarify how `BytesMut::zeroed` works and advantages to manual impl (#…
paolobarbolini Jun 21, 2024
8cc9407
Allow reclaiming the current allocation (#686)
shahn Jun 28, 2024
3443ca5
docs: clarify the behavior of `Buf::chunk` (#717)
vvvviiv Jul 9, 2024
9965a04
Remove unnecessary file (#719)
A5rocks Jul 10, 2024
6b4b0ed
Fix `Bytes::is_unique` when created from shared `BytesMut` (#718)
zyxw59 Jul 12, 2024
fd13c7d
chore: prepare bytes v1.6.1 (#720)
Darksonn Jul 13, 2024
f8c7b57
Merge 'v1.6.1' into 'master' (#721)
Darksonn Jul 13, 2024
03fdde9
chore: prepare v1.7.0 (#724)
mox692 Jul 31, 2024
f488be4
Revert "Reuse capacity when possible in <BytesMut as Buf>::advance im…
Darksonn Aug 1, 2024
dc4fb3e
chore: prepare bytes v1.7.1 (#727)
Darksonn Aug 1, 2024
ed7d5ff
test: ensure BytesMut::advance reduces capacity (#728)
camshaft Aug 2, 2024
291df5a
Fix double spaces in comments and doc comments (#731)
paolobarbolini Aug 19, 2024
79fb853
fix: apply sign extension when decoding int (#732)
paolobarbolini Aug 30, 2024
ac46ebd
ci: update nightly to nightly-2024-09-15 (#734)
taiki-e Sep 17, 2024
d7c1d65
chore: prepare bytes v1.7.2 (#736)
paolobarbolini Sep 18, 2024
0ac54ca
Guarantee address in split_off/split_to for empty slices (#740)
Darksonn Oct 18, 2024
c45697c
chore: prepare bytes v1.8.0 (#741)
Darksonn Oct 21, 2024
30ee8e9
Add `Bytes::from_owner` (#742)
amunra Oct 29, 2024
2d996a2
Fix typo in `Buf::chunk()` comment (#744)
cratelyn Nov 1, 2024
4cd8969
Replace `BufMut::put` with `BufMut::put_slice` in Writer impl (#745)
paolobarbolini Nov 1, 2024
54f1c26
Rename hex_impl! to fmt_impl! and reuse it for fmt::Debug (#743)
LogvinovLeon Nov 8, 2024
d0a14de
chore: prepare bytes v1.9.0 (#748)
kylebarron Nov 28, 2024
f7072c9
Run tests under panic=abort (#749)
Darksonn Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
193 changes: 193 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,193 @@
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master
schedule:
- cron: '0 2 * * 0'

env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
nightly: nightly-2024-09-15

defaults:
run:
shell: bash

jobs:
# Check formatting
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Check formatting
run: cargo fmt --all --check

# TODO
# # Apply clippy lints
# clippy:
# name: clippy
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Apply clippy lints
# run: cargo clippy --all-features

# This represents the minimum Rust version supported by
# Bytes. Updating this should be done in a dedicated PR.
#
# Tests are not run as tests may require newer versions of
# rust.
minrust:
name: minrust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Check
run: cargo hack check --feature-powerset --optional-deps --rust-version

# Stable
stable:
name: stable
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update stable --no-self-update
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Test
run: ci/test-stable.sh test

# Nightly
nightly:
name: nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update $nightly && rustup default $nightly
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Test
run: ci/test-stable.sh test

panic-abort:
name: panic=abort tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update $nightly && rustup default $nightly
- name: Run tests with -Cpanic=abort
run: ci/panic-abort.sh

# Run tests on some extra platforms
cross:
name: cross
strategy:
matrix:
target:
- i686-unknown-linux-gnu
- armv7-unknown-linux-gnueabihf
- powerpc-unknown-linux-gnu
- powerpc64-unknown-linux-gnu
- wasm32-unknown-unknown
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update stable
- name: Install cross
uses: taiki-e/install-action@cross
if: matrix.target != 'wasm32-unknown-unknown'
- name: cross build --target ${{ matrix.target }}
run: cross build --target ${{ matrix.target }}
if: matrix.target != 'wasm32-unknown-unknown'
# WASM support
- name: cargo build --target ${{ matrix.target }}
run: |
rustup target add ${{ matrix.target }}
cargo build --target ${{ matrix.target }}
if: matrix.target == 'wasm32-unknown-unknown'

# Sanitizers
tsan:
name: tsan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update $nightly && rustup default $nightly
- name: Install rust-src
run: rustup component add rust-src
- name: ASAN / TSAN
run: ci/tsan.sh

miri:
name: miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update $nightly && rustup default $nightly
- name: Miri
run: ci/miri.sh

# Loom
loom:
name: loom
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update $nightly && rustup default $nightly
- name: Loom tests
run: RUSTFLAGS="--cfg loom -Dwarnings" cargo test --lib

publish_docs:
name: Publish Documentation
needs:
- rustfmt
# - clippy
- stable
- nightly
- minrust
- cross
- tsan
- miri
- loom
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: rustup update $nightly && rustup default $nightly
- name: Build documentation
run: cargo doc --no-deps --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
- name: Publish documentation
run: |
cd target/doc
git init
git add .
git -c user.name='ci' -c user.email='ci' commit -m 'Deploy Bytes API documentation'
git push -f -q https://git:${{ secrets.github_token }}@github.com/${{ github.repository }} HEAD:gh-pages
if: github.event_name == 'push' && github.event.ref == 'refs/heads/master' && github.repository == 'tokio-rs/bytes'
Loading