Skip to content

Commit 5bc4a08

Browse files
authored
Merge pull request #28 from chrysn-pull-requests/doc-size-optimizations
Mention size requirement and unrealized optimizations
2 parents fbb0ad8 + 6b31e37 commit 5bc4a08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
//! - Overflow will panic in debug and wrap in release.
88
//! - All possible lossless conversions is possible by using `From`.
99
//! - When `TryFrom` is stabilized fallible conversions will also be supported.
10+
//!
11+
//! The uX types take up as much space as the smallest integer type that can contain them;
12+
//! the compiler can not yet be made aware of further optimization potential,
13+
//! and thus does not use it:
14+
//! an `Option<u7>` still takes up two bytes.
1015
1116

1217
#![cfg_attr(not(feature="std"), no_std)]

0 commit comments

Comments
 (0)