Skip to content

Commit

Permalink
Update to zig 0.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimschmidt557 committed Aug 9, 2024
1 parent 0236038 commit 67b951a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:
submodules: true
- uses: goto-bus-stop/setup-zig@v2
with:
version: 0.11.0
version: 0.13.0
- name: Build
run: zig build test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
zig-cache/
.zig-cache/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
![CI](https://github.com/ziglibs/zig-string-searching/workflows/CI/badge.svg)

Implementation of some string-search algorithms in
[zig](https://ziglang.org). Compatible with zig v0.11.0.
[zig](https://ziglang.org). Compatible with zig 0.13.0.

### Boyer-Moore string searching

Expand Down
6 changes: 3 additions & 3 deletions build.zig
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const Builder = @import("std").build.Builder;
const Build = @import("std").Build;

pub fn build(b: *Builder) void {
pub fn build(b: *Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});

const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/main.zig" },
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
Expand Down
1 change: 0 additions & 1 deletion src/bitap.zig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub fn bitap(
text: T,
pattern: T,
) ?usize {
assert(std.meta.trait.isIndexable(T));
const ElemType = std.meta.Elem(T);
assert(@typeInfo(ElemType) == .Int);
assert(pattern.len <= max_pattern_length);
Expand Down
1 change: 0 additions & 1 deletion src/boyer_moore.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const test_suites = @import("test_cases.zig").test_suites;
const possibleValues = @import("common.zig").possibleValues;

pub fn StringFinder(comptime T: type) type {
assert(std.meta.trait.isIndexable(T));
const ElemType = std.meta.Elem(T);
assert(@typeInfo(ElemType) == .Int);

Expand Down
2 changes: 2 additions & 0 deletions src/rabin_karp.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ const test_suites = @import("test_cases.zig").test_suites;
pub fn byteRabinKarp(text: []const u8, pattern: []const u8) ?usize {
const hashFn = struct {
pub fn f(str: []const u8) usize {
// TODO
return 0;
}
}.f;

const continueHashFn = struct {
pub fn f(h: usize, x: u8) usize {
// TODO
return 0;
}
}.f;
Expand Down

0 comments on commit 67b951a

Please sign in to comment.