aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib.rs
diff options
context:
space:
mode:
authorTeddy Wing2020-08-02 04:31:11 +0200
committerTeddy Wing2020-08-02 04:31:11 +0200
commit38a871f28bad90e238021d8cc46b9fa926f9df75 (patch)
tree5ae0e9ecf8fec46c7a48c4665b333833310c33d1 /src/lib.rs
parent13710b49cc40c0e78eec9a94ce9b0ea8a09c3860 (diff)
downloadgit-suggestion-38a871f28bad90e238021d8cc46b9fa926f9df75.tar.bz2
git-sugpatch: Error if no remote and suggestion ID argument
We want to allow not having a remote when URL arguments are given, but require it when a suggestion ID argument is given (otherwise we wouldn't have an owner-repo pair to make the GitHub request). Had some trouble with the `OwnerRepo.o_r` value. It was being moved into the closure, so tried a loop. There was a similar problem with the loop. However, by returning, I was able to get a reference to the `Result` instead of having it be moved.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 0a8ab13..af0e7bb 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -2,8 +2,7 @@
pub mod config;
pub mod error;
-
-pub(crate) mod owner_repo;
+pub mod owner_repo;
mod arg;