Skip to content

Commit 8ea96d7

Browse files
committed
cleanup
1 parent d286978 commit 8ea96d7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
Package recode provides functionality to encode and decode any byte data into a mnemonic and back, using a custom word list.
88

9-
> Words list should be `2^N` long, 2,4,8, etc.
9+
> The word list must have a length that is a power of two (e.g., 2, 4, 8, 16, ...).
1010
1111
## Example
1212

dictionary.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func NewDictionary(words []string) (Recoder, error) {
3939
}
4040

4141
bitLenRaw := math.Log2(float64(len(words)))
42-
if bitLenRaw != float64(int64(bitLenRaw)) {
42+
if bitLenRaw != float64(int(bitLenRaw)) {
4343
return nil, errors.New("dictionary should be complete, len(words) == 2^N")
4444
}
4545
bitsBatchSize := int(bitLenRaw)

0 commit comments

Comments
 (0)