diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2020-07-28 17:00:48 +0300 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2020-07-28 18:52:11 +0300 |
commit | a022bbe260000d327c136af30774211d75795a01 (patch) | |
tree | 673ab46d61348c15f6d072fc2cdb728853c88e55 /net | |
parent | 7255c1d204e2c208a4e00a61b6e9f34f47e30e24 (diff) |
Fix some new clippy warnings
Diffstat (limited to 'net')
-rw-r--r-- | net/rusoto/src/s3url.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rusoto/src/s3url.rs b/net/rusoto/src/s3url.rs index 01a41a833..c059f96fb 100644 --- a/net/rusoto/src/s3url.rs +++ b/net/rusoto/src/s3url.rs @@ -44,7 +44,7 @@ impl ToString for GstS3Url { } pub fn parse_s3_url(url_str: &str) -> Result<GstS3Url, String> { - let url = Url::parse(url_str).or_else(|err| Err(format!("Parse error: {}", err)))?; + let url = Url::parse(url_str).map_err(|err| format!("Parse error: {}", err))?; if url.scheme() != "s3" { return Err(format!("Unsupported URI '{}'", url.scheme())); @@ -55,7 +55,7 @@ pub fn parse_s3_url(url_str: &str) -> Result<GstS3Url, String> { } let host = url.host_str().unwrap(); - let region = Region::from_str(host).or_else(|_| Err(format!("Invalid region '{}'", host)))?; + let region = Region::from_str(host).map_err(|_| format!("Invalid region '{}'", host))?; let mut path = url .path_segments() |