Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Context struct to have usize instead of i32 #20

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

wdoppenberg
Copy link

@wdoppenberg wdoppenberg commented Aug 23, 2023

I kept getting an error as follows:

error[E0308]: mismatched types
   --> src/snowball/algorithms/armenian.rs:352:26
    |
352 |     env.limit_backward = context.i_pV;
    |     ------------------   ^^^^^^^^^^^^ expected `usize`, found `i32`
    |     |
    |     expected due to the type of this binding

For more information about this error, try `rustc --explain E0308`.

This was easily fixed by changing the Context struct's fields to be usize.

  • ran cargo test

Furthermore, I added a basic GH Actions workflow to run cargo test.

Ngalstyan4 added a commit to Ngalstyan4/rust-stemmers that referenced this pull request Sep 13, 2024
It seems at some point snowball_env.rs has been updated in the rust
snowball backend but the change is not reflected in rust-stemmers
project.

The right fix probably is to fix snowball_env.rs and regenerate all rust
code for language-specific stemmers. But this small change at least
makes the main branch compile out of the box again.

See CurrySoftware#20 for an additional github action suggestion that runs tests on
PRs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant