Conversation
src/lib.rs
Outdated
| /// ..ReplaceConf::default() | ||
| /// }) | ||
| /// ``` | ||
| pub fn replace(find: String, replace_with: String, replace_conf: ReplaceConf) -> Result<()> { |
There was a problem hiding this comment.
Looks good, thank you! One thing I'm wondering, though, is it possible to use &str instead of String as the type for find and replace_with? Otherwise, we would always have to create and move Strings. In the current implementation, for example, replace("foo", "bar", ...) is not possible.
|
Since this is building off of #193 I'm going to put this on the backburner milestone as well |
Add config builder, test and support `&str` argument.
|
Alright the release is out, so I'm back to revisiting this. I posted more of my updated thoughts here (#194 (comment)), but the gist is that too many things are currently changing and more stuff is likely to change in the future within Thanks for your contribution nevertheless, and sorry for changing my mind on this 🙇 |
This PR is based on #193. So do not merge me before when #193 is merged, please.
This PR is going to solve #194. It supports users can:
Maybe using a builder is a great idea? And I also need more tests for it.
Your advice is important to me, @CosmicHorrorDev and @fujidaiti. What do you think?