alloy-rs / alloy-rs/ruint

`bytes`: _to_smallvec to avoid allocation.

Đang mở
#39 0 bình luận 0 reaction 1 người được giao Được @recmo nhận Xem trên GitHub
optimize tracker
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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.