rust-cli / rexpect

.github/workflows/ci.yml
https://docs.rs/rexpect
MIT License
328 stars 56 forks source link

exp_string should take String. #34

Open cheako opened 3 years ago

cheako commented 3 years ago

I don't know how ppl feel about API changes, I'd guess there are so few users it doesn't matter as long as the minor version id bumped appropriately.

APIs should take owned values when they need an owned clone of something, instead of calling to_owned() or in this case to_string().

See: https://www.philipdaniels.com/blog/2019/rust-api-design/