Commit b8b68cb279

xackus <14938807+xackus@users.noreply.github.com>
2020-09-07 22:07:34
std: clean up bitrotten imports in crypto
1 parent 8716fde
lib/std/crypto/benchmark.zig
@@ -5,8 +5,8 @@
 // and substantial portions of the software.
 // zig run benchmark.zig --release-fast --override-lib-dir ..
 
-const builtin = @import("builtin");
-const std = @import("std");
+const std = @import("../std.zig");
+const builtin = std.builtin;
 const mem = std.mem;
 const time = std.time;
 const Timer = time.Timer;
lib/std/crypto/blake2.zig
@@ -3,10 +3,10 @@
 // This file is part of [zig](https://ziglang.org/), which is MIT licensed.
 // The MIT license requires this copyright notice to be included in all copies
 // and substantial portions of the software.
-const mem = @import("../mem.zig");
-const builtin = @import("builtin");
-const debug = @import("../debug.zig");
-const math = @import("../math.zig");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
 const htest = @import("test.zig");
 
 const RoundParam = struct {
lib/std/crypto/chacha20.zig
@@ -7,10 +7,8 @@
 
 const std = @import("../std.zig");
 const mem = std.mem;
-const endian = std.endian;
 const assert = std.debug.assert;
 const testing = std.testing;
-const builtin = @import("builtin");
 const maxInt = std.math.maxInt;
 const Poly1305 = std.crypto.onetimeauth.Poly1305;
 
lib/std/crypto/md5.zig
@@ -3,12 +3,10 @@
 // This file is part of [zig](https://ziglang.org/), which is MIT licensed.
 // The MIT license requires this copyright notice to be included in all copies
 // and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const builtin = @import("builtin");
-const debug = @import("../debug.zig");
-const fmt = @import("../fmt.zig");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
 
 const RoundParam = struct {
     a: usize,
lib/std/crypto/poly1305.zig
@@ -3,7 +3,7 @@
 // This file is part of [zig](https://ziglang.org/), which is MIT licensed.
 // The MIT license requires this copyright notice to be included in all copies
 // and substantial portions of the software.
-const std = @import("std");
+const std = @import("../std.zig");
 const mem = std.mem;
 
 pub const Poly1305 = struct {
lib/std/crypto/sha1.zig
@@ -3,11 +3,10 @@
 // This file is part of [zig](https://ziglang.org/), which is MIT licensed.
 // The MIT license requires this copyright notice to be included in all copies
 // and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const debug = @import("../debug.zig");
-const builtin = @import("builtin");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
 
 const RoundParam = struct {
     a: usize,
lib/std/crypto/sha2.zig
@@ -3,11 +3,10 @@
 // This file is part of [zig](https://ziglang.org/), which is MIT licensed.
 // The MIT license requires this copyright notice to be included in all copies
 // and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const debug = @import("../debug.zig");
-const builtin = @import("builtin");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
 const htest = @import("test.zig");
 
 /////////////////////
lib/std/crypto/sha3.zig
@@ -3,11 +3,10 @@
 // This file is part of [zig](https://ziglang.org/), which is MIT licensed.
 // The MIT license requires this copyright notice to be included in all copies
 // and substantial portions of the software.
-const mem = @import("../mem.zig");
-const math = @import("../math.zig");
-const endian = @import("../endian.zig");
-const debug = @import("../debug.zig");
-const builtin = @import("builtin");
+const std = @import("../std.zig");
+const mem = std.mem;
+const math = std.math;
+const debug = std.debug;
 const htest = @import("test.zig");
 
 pub const Sha3_224 = Keccak(224, 0x06);
lib/std/crypto/test.zig
@@ -5,7 +5,6 @@
 // and substantial portions of the software.
 const std = @import("../std.zig");
 const testing = std.testing;
-const mem = std.mem;
 const fmt = std.fmt;
 
 // Hash using the specified hasher `H` asserting `expected == H(input)`.