aboutsummaryrefslogtreecommitdiffstats
path: root/src/suggestion.rs
AgeCommit message (Collapse)Author
2020-08-04Add license (GNU GPLv3+)Teddy Wing
2020-08-02Add documentation commentsTeddy Wing
Light documentation for our various functions and types.
2020-08-02Move suggestion arguments check to `Config::get`Teddy Wing
Since this check for suggestion arguments is in both binaries, we can move it to the common preflight function. Clean up other areas now that we moved the function.
2020-08-02Add `-h` argumentTeddy Wing
Print usage on `-h` and `--help`. Store the usage brief on `Config` in order to be able to print it from multiple places.
2020-08-02for_suggestion: Replace `unwrap`s with exitsTeddy Wing
Print the error and exit.
2020-08-02git-sugpatch: Move the suggestion arguments loop to a new functionTeddy Wing
Split this out into a separate function because I want to reuse it in `git-sugapply`.
2020-08-01Move library to a separate crateTeddy Wing
Keep the binaries in the root crate, and add a new crate for the `github-suggestion` library. I want to add some library code to the CLI programs to extract common functionality between the different binaries.
2020-07-29suggestion.rs: Remove research testsTeddy Wing
These weren't actual tests. I was using them to research different implementation approaches.
2020-07-29Suggestion: Return `Result` from `apply()` and `apply_to()`Teddy Wing
Replace `unwrap`s with trys.
2020-07-29Suggestion.suggestion_with_line_ending: Return `Result`Teddy Wing
Remove the `unwrap` in this method and return a `Result`.
2020-07-29Suggestion: Remove unused `suggestion()` and `suggestion_patch()`Teddy Wing
These methods are no longer used.
2020-07-29Suggestion: Remove `unwrap`s and return `Result`s from diff methodsTeddy Wing
Extend the `Error` enum with new variants to capture the possible errors from `diff()` and `diff_with_repo()`.
2020-07-28Suggestion: Remove unused `patch` methodTeddy Wing
The newer `Suggestion.diff()` method fulfills the same need.
2020-07-28Move `Suggestion` to a new moduleTeddy Wing
Planning to separate the `Suggestion` and `Client` code.