diff options
| author | 2021-10-06 20:38:53 -0700 | |
|---|---|---|
| committer | 2021-10-06 20:38:53 -0700 | |
| commit | b1327d49dad0bf67970cb9cce10b9d914a2fe89d (patch) | |
| tree | d7281f0ede92a6abf53f7ebda562600be7bd78d0 | |
| parent | add inserting and reading test for struct BaseType support (diff) | |
| download | zig-sqlite-b1327d49dad0bf67970cb9cce10b9d914a2fe89d.tar.gz zig-sqlite-b1327d49dad0bf67970cb9cce10b9d914a2fe89d.tar.xz zig-sqlite-b1327d49dad0bf67970cb9cce10b9d914a2fe89d.zip | |
use `try` instead of `catch unreachable`
| -rw-r--r-- | sqlite.zig | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -2275,7 +2275,7 @@ const MyData = struct { | |||
| 2275 | var i: usize = 0; | 2275 | var i: usize = 0; |
| 2276 | while (i < result.len) : (i += 1) { | 2276 | while (i < result.len) : (i += 1) { |
| 2277 | const j = i * 2; | 2277 | const j = i * 2; |
| 2278 | result[i] = std.fmt.parseUnsigned(u8, value[j..][0..2], 16) catch unreachable; | 2278 | result[i] = try std.fmt.parseUnsigned(u8, value[j..][0..2], 16); |
| 2279 | } | 2279 | } |
| 2280 | return MyData{ .data = result }; | 2280 | return MyData{ .data = result }; |
| 2281 | } | 2281 | } |