File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ impl Client {
120
120
}
121
121
122
122
pub fn fetch_pull_request ( & self , pr_info : & PullRequestUrls ) -> DashResult < PullRequestFromJson > {
123
- if let Some ( url) = pr_info. get ( " url" ) {
123
+ if let Some ( url) = & pr_info. url {
124
124
Ok ( self . get ( url, None ) ?. json ( ) ?)
125
125
} else {
126
126
throw ! ( DashError :: Misc ( None ) )
Original file line number Diff line number Diff line change 1
1
// Copyright 2016 Adam Perry. Dual-licensed MIT and Apache 2.0 (see LICENSE files for details).
2
2
3
- use std:: collections:: BTreeMap ;
4
3
use std:: i32;
5
4
6
5
use chrono:: { DateTime , Utc } ;
@@ -50,7 +49,10 @@ pub struct LabelFromJson {
50
49
name : String ,
51
50
}
52
51
53
- pub type PullRequestUrls = BTreeMap < String , String > ;
52
+ #[ derive( Debug , Deserialize ) ]
53
+ pub struct PullRequestUrls {
54
+ pub url : Option < String > ,
55
+ }
54
56
55
57
#[ derive( Debug , Deserialize ) ]
56
58
pub struct IssueFromJson {
You can’t perform that action at this time.
0 commit comments