assert-rs / predicates-rs

Boolean-valued predicate functions in Rust
docs.rs/predicates
Apache License 2.0
175 stars 29 forks source link

In `eq_file` docs, mention `utf8`? #145

Open smoelius opened 1 year ago

smoelius commented 1 year ago

Should the eq_file docs mention utf8?

With the code that is there now, a mismatch results in a somewhat opaque list of byte values. While it is not too hard to find utf8, mentioning it outright would save the extra step.

I can send a PR if you agree.

epage commented 1 year ago

I feel like the ideal solution would be to move eq_file onto BinaryFilePredicate and have a use re-export it as this would point people to the type and the docs would all be in one place but that doesn't appear to be supported in Rust.

If moving forward with this, I'd prefer that all of the other cases get a similar treatment.

smoelius commented 1 year ago

If moving forward with this, I'd prefer that all of the other cases get a similar treatment.

"Other cases"?

epage commented 1 year ago

The big issue here is discoverability of methods on the returned predicated. We have other predicate types with methods that we should be calling out