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

fix: make small fixes #38

Merged
merged 1 commit into from
Jan 23, 2024
Merged

fix: make small fixes #38

merged 1 commit into from
Jan 23, 2024

Conversation

silathdiir
Copy link
Contributor

Summary

  • add toolchain.toml to set nightly rust.
  • update .gitignore.
  • simplify find_index_subvector function, and tested as:
fn main() {
    let v = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
    let t = &[5, 6, 7];

    let r = v.windows(t.len()).position(|s| s == t);
    // Result is `Some(4)`.
    println!("Found result = {r:?}");
}

Copy link
Collaborator

@nikkolasg nikkolasg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 Thank you !

@nikkolasg nikkolasg merged commit 47277db into main Jan 23, 2024
@silathdiir silathdiir deleted the fix/small-update branch January 23, 2024 14:23
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.

2 participants