aboutsummaryrefslogtreecommitdiff
path: root/std/base64.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-01-09 09:56:24 -0500
committerAndrew Kelley <superjoe30@gmail.com>2018-01-09 09:56:24 -0500
commitd1d3dbc7b5bc986849db476e491300ffd18d4db5 (patch)
tree8ab3bb2b5b8a82edf18caca6e28dc8e74ab81d11 /std/base64.zig
parent5a8d87f5042b5ab86de7c72df4ce84a314878e40 (diff)
parent3c094116aae459b651934663a31981cf09cdb3e4 (diff)
downloadzig-d1d3dbc7b5bc986849db476e491300ffd18d4db5.tar.gz
zig-d1d3dbc7b5bc986849db476e491300ffd18d4db5.zip
Merge branch 'master' into llvm6
Diffstat (limited to 'std/base64.zig')
-rw-r--r--std/base64.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/std/base64.zig b/std/base64.zig
index a790227c5d..10650d3243 100644
--- a/std/base64.zig
+++ b/std/base64.zig
@@ -120,7 +120,7 @@ pub const Base64Decoder = struct {
/// invalid characters result in error.InvalidCharacter.
/// invalid padding results in error.InvalidPadding.
pub fn decode(decoder: &const Base64Decoder, dest: []u8, source: []const u8) -> %void {
- assert(dest.len == %%decoder.calcSize(source));
+ assert(dest.len == (decoder.calcSize(source) catch unreachable));
assert(source.len % 4 == 0);
var src_cursor: usize = 0;
@@ -374,8 +374,8 @@ fn calcDecodedSizeExactUnsafe(source: []const u8, pad_char: u8) -> usize {
test "base64" {
@setEvalBranchQuota(5000);
- %%testBase64();
- comptime %%testBase64();
+ testBase64() catch unreachable;
+ comptime (testBase64() catch unreachable);
}
fn testBase64() -> %void {