Skip to content

Commit b8b68cb

Browse files
xackusandrewrk
authored andcommitted
std: clean up bitrotten imports in crypto
1 parent 8716fde commit b8b68cb

File tree

9 files changed

+23
-31
lines changed

9 files changed

+23
-31
lines changed

lib/std/crypto/benchmark.zig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
// and substantial portions of the software.
66
// zig run benchmark.zig --release-fast --override-lib-dir ..
77

8-
const builtin = @import("builtin");
9-
const std = @import("std");
8+
const std = @import("../std.zig");
9+
const builtin = std.builtin;
1010
const mem = std.mem;
1111
const time = std.time;
1212
const Timer = time.Timer;

lib/std/crypto/blake2.zig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44
// The MIT license requires this copyright notice to be included in all copies
55
// and substantial portions of the software.
6-
const mem = @import("../mem.zig");
7-
const builtin = @import("builtin");
8-
const debug = @import("../debug.zig");
9-
const math = @import("../math.zig");
6+
const std = @import("../std.zig");
7+
const mem = std.mem;
8+
const math = std.math;
9+
const debug = std.debug;
1010
const htest = @import("test.zig");
1111

1212
const RoundParam = struct {

lib/std/crypto/chacha20.zig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
const std = @import("../std.zig");
99
const mem = std.mem;
10-
const endian = std.endian;
1110
const assert = std.debug.assert;
1211
const testing = std.testing;
13-
const builtin = @import("builtin");
1412
const maxInt = std.math.maxInt;
1513
const Poly1305 = std.crypto.onetimeauth.Poly1305;
1614

lib/std/crypto/md5.zig

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44
// The MIT license requires this copyright notice to be included in all copies
55
// and substantial portions of the software.
6-
const mem = @import("../mem.zig");
7-
const math = @import("../math.zig");
8-
const endian = @import("../endian.zig");
9-
const builtin = @import("builtin");
10-
const debug = @import("../debug.zig");
11-
const fmt = @import("../fmt.zig");
6+
const std = @import("../std.zig");
7+
const mem = std.mem;
8+
const math = std.math;
9+
const debug = std.debug;
1210

1311
const RoundParam = struct {
1412
a: usize,

lib/std/crypto/poly1305.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44
// The MIT license requires this copyright notice to be included in all copies
55
// and substantial portions of the software.
6-
const std = @import("std");
6+
const std = @import("../std.zig");
77
const mem = std.mem;
88

99
pub const Poly1305 = struct {

lib/std/crypto/sha1.zig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44
// The MIT license requires this copyright notice to be included in all copies
55
// and substantial portions of the software.
6-
const mem = @import("../mem.zig");
7-
const math = @import("../math.zig");
8-
const endian = @import("../endian.zig");
9-
const debug = @import("../debug.zig");
10-
const builtin = @import("builtin");
6+
const std = @import("../std.zig");
7+
const mem = std.mem;
8+
const math = std.math;
9+
const debug = std.debug;
1110

1211
const RoundParam = struct {
1312
a: usize,

lib/std/crypto/sha2.zig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44
// The MIT license requires this copyright notice to be included in all copies
55
// and substantial portions of the software.
6-
const mem = @import("../mem.zig");
7-
const math = @import("../math.zig");
8-
const endian = @import("../endian.zig");
9-
const debug = @import("../debug.zig");
10-
const builtin = @import("builtin");
6+
const std = @import("../std.zig");
7+
const mem = std.mem;
8+
const math = std.math;
9+
const debug = std.debug;
1110
const htest = @import("test.zig");
1211

1312
/////////////////////

lib/std/crypto/sha3.zig

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
// This file is part of [zig](https://ziglang.org/), which is MIT licensed.
44
// The MIT license requires this copyright notice to be included in all copies
55
// and substantial portions of the software.
6-
const mem = @import("../mem.zig");
7-
const math = @import("../math.zig");
8-
const endian = @import("../endian.zig");
9-
const debug = @import("../debug.zig");
10-
const builtin = @import("builtin");
6+
const std = @import("../std.zig");
7+
const mem = std.mem;
8+
const math = std.math;
9+
const debug = std.debug;
1110
const htest = @import("test.zig");
1211

1312
pub const Sha3_224 = Keccak(224, 0x06);

lib/std/crypto/test.zig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
// and substantial portions of the software.
66
const std = @import("../std.zig");
77
const testing = std.testing;
8-
const mem = std.mem;
98
const fmt = std.fmt;
109

1110
// Hash using the specified hasher `H` asserting `expected == H(input)`.

0 commit comments

Comments
 (0)