Skip to content

Commit dc8d356

Browse files
committed
f clarify why we're subtracting one.
1 parent ecaf93c commit dc8d356

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning-types/src/features.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -709,8 +709,8 @@ const ANY_OPTIONAL_FEATURES_MASK: u8 = 0b10_10_10_10;
709709
// space-wise, but we only get the remaining 2 usizes in length available for our own stuff (as any
710710
// other value is interpreted as the `Heap` variant).
711711
//
712-
// Thus, as long as we never use more than 15 bytes for our Held variant `FeatureFlags` is the same
713-
// length as a `Vec` in memory.
712+
// Thus, as long as we never use more than 16 bytes (15 bytes for the data and one byte for the
713+
// length) for our Held variant `FeatureFlags` is the same length as a `Vec` in memory.
714714
const DIRECT_ALLOC_BYTES: usize = if sealed::MIN_FEATURES_ALLOCATION_BYTES > 8 * 2 - 1 {
715715
sealed::MIN_FEATURES_ALLOCATION_BYTES
716716
} else {

0 commit comments

Comments
 (0)