From 7028b38ba6ada33975ea44521ec121367c9d15f9 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sun, 23 Aug 2020 19:45:28 +0200 Subject: Suggestion: Rename `diff_command()` to `blob()` This function is no longer calling the `git diff` command, so this name doesn't make sense. --- github-suggestion/src/suggestion.rs | 2 +- src/bin/git-sugdiff.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/github-suggestion/src/suggestion.rs b/github-suggestion/src/suggestion.rs index 21591b1..4bd62d6 100644 --- a/github-suggestion/src/suggestion.rs +++ b/github-suggestion/src/suggestion.rs @@ -134,7 +134,7 @@ impl Suggestion { ) } - pub fn diff_command(&self) -> Result { + pub fn blob(&self) -> Result { let repo = Repository::open(".")?; let commit = repo.find_commit(self.commit.parse()?)?; diff --git a/src/bin/git-sugdiff.rs b/src/bin/git-sugdiff.rs index 6bc67d9..9bc7418 100644 --- a/src/bin/git-sugdiff.rs +++ b/src/bin/git-sugdiff.rs @@ -43,7 +43,7 @@ fn main() { &config, |suggestion| { // TODO: Needs to work for multiple suggestions at once - let blob = suggestion.diff_command().unwrap(); + let blob = suggestion.blob().unwrap(); Command::new("git") .arg("--no-pager") -- cgit v1.2.3