`bytes`: _to_smallvec to avoid allocation.
- Ngôn ngữ chính
- Rust
- Star
- 225
- Fork
- 70
- Merge trung bình
- 16 giờ 54 phút
- Pull request đã merge (30 ngày)
- 8
Mô tả
*On 2022-05-28 @recmo wrote in [`d2363fc`](https://github.com/recmo/uint/commit/d2363fc59b20c9ad1c827634b3003825dd02e2c6) “blocked”:*
_to_smallvec to avoid allocation.
```rust
ptr::{addr_of, addr_of_mut},
slice,
};
use std::borrow::Cow;
// OPT: *_to_smallvec to avoid allocation.
impl Uint {
/// The size of this integer type in bytes. Note that some bits may be
/// forced zero if BITS is not cleanly divisible by eight.
pub const BYTES: usize = (BITS + 7) / 8;
```
*From [`src/bytes.rs:15`](https://github.com/recmo/uint/blob/d2363fc59b20c9ad1c827634b3003825dd02e2c6/src/bytes.rs#L15)*
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.