Open Techassi opened 1 year ago
In your example, shouldn't it be a vec
with multiple strings as predicates, or am I misunderstanding something?
let predicate_fn = predicate::str::contains_all(vec!["One", "Two", "Three"]);
You are absolutely correct. I somehow forgot to add the commas.
EDIT: I added the commas in my comment above and in the doc test in 45d4a17.
If we move forward with this, can you squash your commits?
Yes, I can do that once we are ready with this PR.
Yes, I can do that once we are ready with this PR.
The downside to that is it requires an extra ping-pong between us to get this in, causing more context switches, and being fairly easy to fall through the cracks
The downside to that is it requires an extra ping-pong between us to get this in, causing more context switches, and being fairly easy to fall through the cracks
Can't we just use squash-merge? Then GitHub would do the heavy lifting for us :)
Can't we just use squash-merge? Then GitHub would do the heavy lifting for us :)
Not the most ideal experience and I don't like blindly squashing PRs but only doing it as a last resort because we should preserve multiple commits when they are relevant.
I now squashed all previous commits (Adding the function, updating the docs, and merging changes from main).
I will now continue to work on the unresolved conversations above.
This PR adds the
str::contains_all
predicate function. It allows one to check if the input contains all provided needles.