Closed dbrgn closed 2 years ago
We could avoid the dynamic dispatch if we use https://docs.rs/either/latest/either/enum.Either.html#impl-Read, don't know if it is overkill though
Whoa, I didn't know that Either
has a blanket-Read
-impl. This is nice!
Ahh, wait, Either
is a separate crate and not in the stdlib. Then I don't think it's worth the added dependency 🙂
Great, I'll merge this once CI passes. Thanks @dmaahs2017 and @niklasmohrin for the review and comments! I think the patch system will be a very useful feature in the next release.
Fair enough - we can always come back to this thought if we feel like optimizing
Hehe, as_slice()
was added only in Rust 1.57, which hasn't been stable for a month (as per our MSRV policy). I'll use &b"\n"[..]
unless there's a better way.
This way a patch file does not need a well-formed header anymore.
Fixes #181 and thus the last open feature/bug issue for the 1.5.0 milestone! 🎉
Replaces #202.