File tree 3 files changed +8
-4
lines changed
3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
#![ feature( io_error_more) ]
2
- #![ feature( const_option_ext) ]
3
2
#![ forbid( unsafe_code) ]
4
3
5
4
use std:: path:: Path ;
Original file line number Diff line number Diff line change @@ -9,8 +9,10 @@ use super::Project;
9
9
use super :: Provider ;
10
10
11
11
const ACCEPT_HEADER_JSON : & str = "application/vnd.github.v3+json" ;
12
- const GITHUB_API_BASEURL : & str =
13
- option_env ! ( "GITHUB_API_BASEURL" ) . unwrap_or ( "https://api.github.com" ) ;
12
+ const GITHUB_API_BASEURL : & str = match option_env ! ( "GITHUB_API_BASEURL" ) {
13
+ Some ( url) => url,
14
+ None => "https://api.github.com" ,
15
+ } ;
14
16
15
17
#[ derive( Deserialize ) ]
16
18
pub struct GithubProject {
Original file line number Diff line number Diff line change @@ -9,7 +9,10 @@ use super::Project;
9
9
use super :: Provider ;
10
10
11
11
const ACCEPT_HEADER_JSON : & str = "application/json" ;
12
- const GITLAB_API_BASEURL : & str = option_env ! ( "GITLAB_API_BASEURL" ) . unwrap_or ( "https://gitlab.com" ) ;
12
+ const GITLAB_API_BASEURL : & str = match option_env ! ( "GITLAB_API_BASEURL" ) {
13
+ Some ( url) => url,
14
+ None => "https://gitlab.com" ,
15
+ } ;
13
16
14
17
#[ derive( Deserialize ) ]
15
18
#[ serde( rename_all = "lowercase" ) ]
You can’t perform that action at this time.
0 commit comments