-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: TES struct #36
Feat: TES struct #36
Changes from 1 commit
7cf9dfd
0087881
4560fc4
4210498
61fcb7a
780e7ff
47e3ca5
df64e6d
b0ea439
b54b56f
4e5c8dc
ce11ae1
395b00a
b1c12fe
432ca96
57406a1
ab08a44
02685c0
cbba4ae
be2e486
e9ccf43
d4faee2
f1bd0c5
c9cdbfc
27bab17
d656d3b
afbe68c
da80b57
a655a90
6514f6e
e0bdcf5
a1cd3bf
97595e0
a6b63ac
431a831
e447b5a
bcce6ec
f08c9dc
d8ef075
49a702d
c110379
4d88c44
dda27a7
df1fc62
a25c499
3c92b70
bc07b65
0f7decc
19ece96
4e415a5
ac64bb3
1487961
976846b
c96b636
d613722
4f482d3
ebc9bec
e56a623
d37b000
7725298
bad81eb
c95ac80
198e0f8
206c6c4
2f2b6a8
4a41548
2d48bdd
a5b484e
598646f
1369f7e
8ec57cc
1913d3d
ee0948c
44a1d64
5a13d19
0e29df7
e02346c
dff1a21
bedf68f
4ee3302
b8ea658
2d24c43
f6ef231
5d9c4bf
0d8d25c
7fa6bd6
00b6367
6566d7d
9e9a4a7
81e26e6
816e47c
a9ee309
a9b3c0b
8ddb90b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,4 +109,4 @@ jobs: | |
- name: Format | ||
run: | | ||
. $HOME/.cargo/env | ||
cargo fmt -- --check | ||
cargo fmt |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
|
||
|
||
#[derive(Debug, Clone)] | ||
pub struct Configuration { | ||
pub base_path: String, | ||
|
@@ -19,9 +17,12 @@ pub struct ApiKey { | |
pub key: String, | ||
} | ||
|
||
|
||
impl Configuration { | ||
pub fn new(base_path: String, user_agent: Option<String>, oauth_access_token: Option<String>) -> Self { | ||
pub fn new( | ||
base_path: String, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion (bug_risk): Add validation for the base_path URL in the Configuration::new method Adding validation for the
|
||
user_agent: Option<String>, | ||
oauth_access_token: Option<String>, | ||
) -> Self { | ||
Configuration { | ||
base_path, | ||
user_agent, | ||
|
@@ -49,4 +50,4 @@ impl Default for Configuration { | |
api_key: None, | ||
} | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider using more specific types for some Configuration fields
Some fields in the
Configuration
struct are usingOption<String>
. Consider using more specific types for some of these, likeOption<Url>
forbase_path
. This would provide better type safety and make the intended use of these fields clearer.