mirror of
https://github.com/teloxide/teloxide.git
synced 2024-12-23 15:01:45 +01:00
Apply suggestions from code review
This commit is contained in:
parent
cfb3c60a1c
commit
7958f37c60
1 changed files with 2 additions and 8 deletions
10
src/types.rs
10
src/types.rs
|
@ -327,10 +327,7 @@ pub(crate) mod option_url_from_string {
|
|||
let json = r#"{"url":""}"#;
|
||||
let url: Struct = serde_json::from_str(json).unwrap();
|
||||
assert_eq!(url.url, None);
|
||||
assert_eq!(
|
||||
serde_json::to_string(&url).unwrap(),
|
||||
json.to_owned()
|
||||
);
|
||||
assert_eq!(serde_json::to_string(&url).unwrap(), json.to_owned());
|
||||
|
||||
let json = r#"{"url":"https://github.com/token"}"#;
|
||||
let url: Struct = serde_json::from_str(json).unwrap();
|
||||
|
@ -338,10 +335,7 @@ pub(crate) mod option_url_from_string {
|
|||
url.url,
|
||||
Some(Url::from_str("https://github.com/token").unwrap())
|
||||
);
|
||||
assert_eq!(
|
||||
serde_json::to_string(&url).unwrap(),
|
||||
json.to_owned()
|
||||
);
|
||||
assert_eq!(serde_json::to_string(&url).unwrap(), json.to_owned());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue