From 3cd23ecc90a1385accfd82e8b4bab3c7126b8cf5 Mon Sep 17 00:00:00 2001 From: Rutger Broekhoff Date: Mon, 24 May 2021 14:53:29 +0200 Subject: Remove some unnecessary code --- src/nkeys.zig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/nkeys.zig') 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 { defer decoded.wipe(); // gets copied var key_ty_prefix = decoded.prefix[0] & 0b11111000; - var entity_ty_prefix = (decoded.prefix[0] & 0b00000111) << 5 | ((decoded.prefix[1] & 0b11111000) >> 3); + var entity_ty_prefix = (decoded.prefix[0] << 5) | (decoded.prefix[1] >> 3); if (key_ty_prefix != @enumToInt(KeyTypePrefixByte.seed)) return error.InvalidSeed; @@ -328,7 +328,6 @@ const allowed_creds_section_chars_table: [256]bool = allowed: { var table = [_]bool{false} ** 256; const chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.="; for (chars) |char| table[char] = true; - break :allowed table; }; -- cgit v1.2.3