mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-08 00:00:26 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cf91283f8 | ||
|
|
1db67b4a87 |
+6
-1
@@ -1,7 +1,12 @@
|
||||
# 0.5.1 (November 25, 2019)
|
||||
|
||||
### Fix
|
||||
- Growth documentation for `BytesMut` (#321)
|
||||
|
||||
# 0.5.0 (November 25, 2019)
|
||||
|
||||
### Fix
|
||||
- potential overflow in `copy_to_slice`
|
||||
- Potential overflow in `copy_to_slice`
|
||||
|
||||
### Changed
|
||||
- Increased minimum supported Rust version to 1.39.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ name = "bytes"
|
||||
# - Update CHANGELOG.md.
|
||||
# - Update doc URL.
|
||||
# - Create "v0.5.x" git tag.
|
||||
version = "0.5.0"
|
||||
version = "0.5.1"
|
||||
license = "MIT"
|
||||
authors = ["Carl Lerche <[email protected]>"]
|
||||
description = "Types and traits for working with bytes"
|
||||
|
||||
+3
-8
@@ -21,14 +21,9 @@ use crate::loom::sync::atomic::{self, AtomicPtr, AtomicUsize, Ordering};
|
||||
///
|
||||
/// # Growth
|
||||
///
|
||||
/// One key difference from `Vec<u8>` is that most operations **do not
|
||||
/// implicitly grow the buffer**. This means that calling `my_bytes.put("hello
|
||||
/// world");` could panic if `my_bytes` does not have enough capacity. Before
|
||||
/// writing to the buffer, ensure that there is enough remaining capacity by
|
||||
/// calling `my_bytes.remaining_mut()`. In general, avoiding calls to `reserve`
|
||||
/// is preferable.
|
||||
///
|
||||
/// The only exception is `extend` which implicitly reserves required capacity.
|
||||
/// `BytesMut`'s `BufMut` implementation will implicitly grow its buffer as
|
||||
/// necessary. However, explicitly reserving the required space up-front before
|
||||
/// a series of inserts will be more efficient.
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
#![deny(warnings, missing_docs, missing_debug_implementations, rust_2018_idioms)]
|
||||
#![doc(html_root_url = "https://docs.rs/bytes/0.5.0")]
|
||||
#![doc(html_root_url = "https://docs.rs/bytes/0.5.1")]
|
||||
#![no_std]
|
||||
|
||||
//! Provides abstractions for working with bytes.
|
||||
|
||||
Reference in New Issue
Block a user