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 {
120120 }
121121
122122 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 {
124124 Ok ( self . get ( url, None ) ?. json ( ) ?)
125125 } else {
126126 throw ! ( DashError :: Misc ( None ) )
Original file line number Diff line number Diff line change 11// Copyright 2016 Adam Perry. Dual-licensed MIT and Apache 2.0 (see LICENSE files for details).
22
3- use std:: collections:: BTreeMap ;
43use std:: i32;
54
65use chrono:: { DateTime , Utc } ;
@@ -50,7 +49,10 @@ pub struct LabelFromJson {
5049 name : String ,
5150}
5251
53- pub type PullRequestUrls = BTreeMap < String , String > ;
52+ #[ derive( Debug , Deserialize ) ]
53+ pub struct PullRequestUrls {
54+ pub url : Option < String > ,
55+ }
5456
5557#[ derive( Debug , Deserialize ) ]
5658pub struct IssueFromJson {
You can’t perform that action at this time.
0 commit comments