diff options
author | Rutger Broekhoff | 2021-05-24 14:53:29 +0200 |
---|---|---|
committer | Rutger Broekhoff | 2021-05-24 14:53:29 +0200 |
commit | 3cd23ecc90a1385accfd82e8b4bab3c7126b8cf5 (patch) | |
tree | 941c29f721fec8e84d87fdeb0c1b3b8393b3ea6d /src/nkeys.zig | |
parent | 6ded63415265ee733cafa72f821053c0c223ef8d (diff) | |
download | zig-nkeys-3cd23ecc90a1385accfd82e8b4bab3c7126b8cf5.tar.gz zig-nkeys-3cd23ecc90a1385accfd82e8b4bab3c7126b8cf5.zip |
Remove some unnecessary code
Diffstat (limited to 'src/nkeys.zig')
-rw-r--r-- | src/nkeys.zig | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nkeys.zig b/src/nkeys.zig index 3a6c2db..e3d9ef9 100644 --- a/src/nkeys.zig +++ b/src/nkeys.zig | |||
@@ -274,7 +274,7 @@ pub fn decodeSeed(text: *const text_seed) SeedDecodeError!DecodedSeed { | |||
274 | defer decoded.wipe(); // gets copied | 274 | defer decoded.wipe(); // gets copied |
275 | 275 | ||
276 | var key_ty_prefix = decoded.prefix[0] & 0b11111000; | 276 | var key_ty_prefix = decoded.prefix[0] & 0b11111000; |
277 | var entity_ty_prefix = (decoded.prefix[0] & 0b00000111) << 5 | ((decoded.prefix[1] & 0b11111000) >> 3); | 277 | var entity_ty_prefix = (decoded.prefix[0] << 5) | (decoded.prefix[1] >> 3); |
278 | 278 | ||
279 | if (key_ty_prefix != @enumToInt(KeyTypePrefixByte.seed)) | 279 | if (key_ty_prefix != @enumToInt(KeyTypePrefixByte.seed)) |
280 | return error.InvalidSeed; | 280 | return error.InvalidSeed; |
@@ -328,7 +328,6 @@ const allowed_creds_section_chars_table: [256]bool = allowed: { | |||
328 | var table = [_]bool{false} ** 256; | 328 | var table = [_]bool{false} ** 256; |
329 | const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.="; | 329 | const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.="; |
330 | for (chars) |char| table[char] = true; | 330 | for (chars) |char| table[char] = true; |
331 | |||
332 | break :allowed table; | 331 | break :allowed table; |
333 | }; | 332 | }; |
334 | 333 | ||