Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 1 addition & 41 deletions .github/workflows/rust-bindings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ jobs:
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
${{ runner.os }}-cargo
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- name: Run tests
run: bundle exec rake cargo:test

Expand Down Expand Up @@ -76,9 +73,6 @@ jobs:
~/.cargo/git
target
key: ${{ runner.os }}-cargo--${{ hashFiles('**/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
${{ runner.os }}-cargo
- name: rake cargo:build
run: bundle exec rake cargo:build
- name: rake cargo:lint
Expand Down Expand Up @@ -107,37 +101,3 @@ jobs:
components: "rust-src"
- name: Test with sanitizer
run: bundle exec rake cargo:sanitize:${{ matrix.sanitizer }}

# We need to figure out what to do here. When you run publish it checks
# against the latest version published to crates, which means if we have any
# breaking changes in the bindings then this fails.
#
# publish:
# name: cargo:publish
# strategy:
# fail-fast: false
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: head
# bundler-cache: true
# - name: Set up Rust
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: "1.71.1"
# targets: wasm32-wasip1
# - uses: actions/cache@v4
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# restore-keys: |
# ${{ runner.os }}-cargo-${{ hashFiles('Cargo.toml') }}
# ${{ runner.os }}-cargo
# - name: Publish crates (dry-run)
# run: bundle exec rake cargo:publish:dry
2 changes: 1 addition & 1 deletion src/prism.c
Original file line number Diff line number Diff line change
Expand Up @@ -22639,7 +22639,7 @@ static const char *
pm_strnstr(const char *big, const char *little, size_t big_length) {
size_t little_length = strlen(little);

for (const char *big_end = big + big_length; big < big_end; big++) {
for (const char *max = big + big_length - little_length; big <= max; big++) {
if (*big == *little && memcmp(big, little, little_length) == 0) return big;
}

Expand Down