diff --git a/build.zig b/build.zig index 0f6b044..51b993b 100644 --- a/build.zig +++ b/build.zig @@ -1,5 +1,4 @@ const std = @import("std"); -const builtin = @import("builtin"); const Builder = @import("std").Build; const models_subdir = "codegen/sdk-codegen/aws-models/"; // note will probably not work on windows diff --git a/codegen/src/Hasher.zig b/codegen/src/Hasher.zig index cf8ca02..73d9812 100644 --- a/codegen/src/Hasher.zig +++ b/codegen/src/Hasher.zig @@ -20,7 +20,6 @@ const multihash_len = 1 + 1 + Hash.digest_length; pub const hex_multihash_len = 2 * multihash_len; pub const digest_len = Hash.digest_length; -const MultiHashHexDigest = [hex_multihash_len]u8; const MultihashFunction = enum(u16) { identity = 0x00, sha1 = 0x11, @@ -70,7 +69,7 @@ pub fn hex64(x: u64) [16]u8 { var result: [16]u8 = undefined; var i: usize = 0; while (i < 8) : (i += 1) { - const byte = @as(u8, @truncate(x >> @as(u6, @intCast(8 * i)))); + const byte: u8 = @truncate(x >> @as(u6, @intCast(8 * i))); result[i * 2 + 0] = hex_charset[byte >> 4]; result[i * 2 + 1] = hex_charset[byte & 15]; } diff --git a/lib/date/src/parsing.zig b/lib/date/src/parsing.zig index adfac46..4713495 100644 --- a/lib/date/src/parsing.zig +++ b/lib/date/src/parsing.zig @@ -61,7 +61,6 @@ pub fn parseIso8601ToTimestamp(data: []const u8) !i64 { return try dateTimeToTimestamp(try parseIso8601ToDateTime(data)); } -const IsoParsingState = enum { Start, Year, Month, Day, Hour, Minute, Second, Millisecond, End }; /// Converts a string to a timestamp value. May not handle dates before the /// epoch pub fn parseIso8601ToDateTime(data: []const u8) !DateTime { diff --git a/lib/date/src/timestamp.zig b/lib/date/src/timestamp.zig index 882c662..6f996a9 100644 --- a/lib/date/src/timestamp.zig +++ b/lib/date/src/timestamp.zig @@ -1,6 +1,5 @@ const std = @import("std"); const zeit = @import("zeit"); -const json = @import("json"); pub const DateFormat = enum { rfc1123, diff --git a/src/aws_http_base.zig b/src/aws_http_base.zig index f624c3a..4a8f8e4 100644 --- a/src/aws_http_base.zig +++ b/src/aws_http_base.zig @@ -1,6 +1,5 @@ //! This module provides base data structures for aws http requests const std = @import("std"); -const log = std.log.scoped(.aws_base); pub const Request = struct { path: []const u8 = "/", query: []const u8 = "", diff --git a/src/case.zig b/src/case.zig index be7a972..58ddc18 100644 --- a/src/case.zig +++ b/src/case.zig @@ -8,7 +8,7 @@ pub fn snakeToCamel(allocator: std.mem.Allocator, name: []const u8) ![]u8 { var rc = try allocator.alloc(u8, name.len); while (utf8_name.nextCodepoint()) |cp| { if (cp > 0xff) return error.UnicodeNotSupported; - const ascii_char = @as(u8, @truncate(cp)); + const ascii_char: u8 = @truncate(cp); if (ascii_char != '_') { if (previous_ascii == '_' and ascii_char >= 'a' and ascii_char <= 'z') { const uppercase_char = ascii_char - ('a' - 'A');