aboutsummaryrefslogtreecommitdiffstats
path: root/src/url.rs
diff options
context:
space:
mode:
authorTeddy Wing2020-07-25 17:02:09 +0200
committerTeddy Wing2020-07-25 17:02:09 +0200
commit7d894d9223ff05a2597011a898aa38760c16916f (patch)
treea5ddbb347ba38107b40b218953d188aa19ecd592 /src/url.rs
parentc3d12c7edafa3b631a77432dd0fb6ce0d1ca21a0 (diff)
downloadgit-suggestion-7d894d9223ff05a2597011a898aa38760c16916f.tar.bz2
Suggestion: Add `apply_to` method
I didn't feel like writing a test for `Suggestion.apply()`, which writes files, so decided to write a different version that used the original file and a writer. Changed the `Suggestion.suggestion()` function to not prepend "+" to suggestion lines so we can use the function to extract the suggested lines unmodified from the comment. Kept the old version around as `suggestion_patch()` because we may need it to generate patches. Copied the code from `Suggestion.apply()`, except write the changes to `writer` instead of the file at `Suggestion.path`.
Diffstat (limited to 'src/url.rs')
0 files changed, 0 insertions, 0 deletions