From b7c1f2a1357f7f9cdf2eb0187398fc80aaf7e28d Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Mon, 25 Nov 2019 11:19:30 -0800 Subject: [PATCH] prepare v0.5.0 release (#319) --- CHANGELOG.md | 33 ++++++++++++++++++++++++++++++++- Cargo.toml | 20 +++++++++----------- src/lib.rs | 8 ++++---- 3 files changed, 45 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79d15b755..ae9eff92a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,35 @@ -# 0.5.0 (unreleased) +# 0.5.0 (November 25, 2019) + +### Fix +- potential overflow in `copy_to_slice` + +### Changed +- Increased minimum supported Rust version to 1.39. +- `Bytes` is now a "trait object", allowing for custom allocation strategies (#298) +- `BytesMut` implicitly grows internal storage. `remaining_mut()` returns + `usize::MAX` (#316). +- `BufMut::bytes_mut` returns `&mut [MaybeUninit]` to reflect the unknown + initialization state (#305). +- `Buf` / `BufMut` implementations for `&[u8]` and `&mut [u8]` + respectively (#261). +- Move `Buf` / `BufMut` "extra" functions to an extension trait (#306). +- `BufMutExt::limit` (#309). +- `Bytes::slice` takes a `RangeBounds` argument (#265). +- `Bytes::from_static` is now a `const fn` (#311). +- A multitude of smaller performance optimizations. + +### Added +- `no_std` support (#281). +- `get_*`, `put_*`, `get_*_le`, and `put_*le` accessors for handling byte order. +- `BorrowMut` implementation for `BytesMut` (#185). + +### Removed +- `IntoBuf` (#288). +- `Buf` implementation for `&str` (#301). +- `byteorder` dependency (#280). +- `iovec` dependency, use `std::IoSlice` instead (#263). +- optional `either` dependency (#315). +- optional `i128` feature -- now available on stable. (#276). # 0.4.12 (March 6, 2019) diff --git a/Cargo.toml b/Cargo.toml index 9feb647db..ebf1d5bf1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,24 +1,22 @@ [package] -name = "bytes" +name = "bytes" # When releasing to crates.io: # - Update html_root_url. # - Update CHANGELOG.md. # - Update doc URL. -# - Create "v0.4.x" git tag. -version = "0.5.0" -license = "MIT" -authors = ["Carl Lerche "] -description = "Types and traits for working with bytes" +# - Create "v0.5.x" git tag. +version = "0.5.0" +license = "MIT" +authors = ["Carl Lerche "] +description = "Types and traits for working with bytes" documentation = "https://docs.rs/bytes" -repository = "https://github.com/tokio-rs/bytes" -readme = "README.md" -keywords = ["buffers", "zero-copy", "io"] +repository = "https://github.com/tokio-rs/bytes" +readme = "README.md" +keywords = ["buffers", "zero-copy", "io"] categories = ["network-programming", "data-structures"] edition = "2018" -publish = false - [features] default = ["std"] std = [] diff --git a/src/lib.rs b/src/lib.rs index c565aa7a0..161717aa9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,3 +1,7 @@ +#![deny(warnings, missing_docs, missing_debug_implementations, rust_2018_idioms)] +#![doc(html_root_url = "https://docs.rs/bytes/0.5.0")] +#![no_std] + //! Provides abstractions for working with bytes. //! //! The `bytes` crate provides an efficient byte buffer structure @@ -68,10 +72,6 @@ //! perform a syscall, which has the potential of failing. Operations on `Buf` //! and `BufMut` are infallible. -#![deny(warnings, missing_docs, missing_debug_implementations, rust_2018_idioms)] -#![doc(html_root_url = "https://docs.rs/bytes/0.5.0")] - -#![no_std] extern crate alloc;