diff options
author | Teddy Wing | 2020-08-02 18:49:36 +0200 |
---|---|---|
committer | Teddy Wing | 2020-08-02 18:49:51 +0200 |
commit | 8e5ac6f2d4e52eea95e5a6fc2905ce511ac4956e (patch) | |
tree | f5e56fbf1fc673c8a75f160c297fa79d0937e0d4 /github-suggestion/src/url.rs | |
parent | 646ed6c2027864b6373453c2f529796f01b3e715 (diff) | |
download | git-suggestion-8e5ac6f2d4e52eea95e5a6fc2905ce511ac4956e.tar.bz2 |
Add documentation comments
Light documentation for our various functions and types.
Diffstat (limited to 'github-suggestion/src/url.rs')
-rw-r--r-- | github-suggestion/src/url.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/github-suggestion/src/url.rs b/github-suggestion/src/url.rs index 60a3d0e..48da7d2 100644 --- a/github-suggestion/src/url.rs +++ b/github-suggestion/src/url.rs @@ -6,6 +6,7 @@ use url; use url::Url; +/// Errors parsing a suggestion URL. #[derive(Debug, Error)] pub enum Error { #[error("Unable to parse URL")] @@ -21,6 +22,7 @@ pub enum Error { NoOwnerRepo, } +/// The important parts of a suggestion comment URL. #[derive(Debug)] pub struct SuggestionUrl { pub owner: String, @@ -28,6 +30,8 @@ pub struct SuggestionUrl { pub comment_id: String, } +/// Parses a URL with the format +/// `https://github.com/teddywing/github-suggestion/pull/1#discussion_r459691747`. impl FromStr for SuggestionUrl { type Err = Error; |