fix clippy

This commit is contained in:
2020-04-12 14:17:42 +08:00
parent 63919d5532
commit 2e70fc3d73
5 changed files with 18 additions and 18 deletions

View File

@@ -102,7 +102,7 @@ impl OSSClient {
// https://endpoint, or http://endpoint -> endpoint
fn remove_endpoint_http_or_s(endpoint: &str) -> String {
let mut endpoint = endpoint.to_owned();
for prefix in vec![HTTP_SS, HTTPS_SS] {
for prefix in &[HTTP_SS, HTTPS_SS] {
if endpoint.starts_with(prefix) {
endpoint = endpoint.chars().skip(prefix.chars().count()).collect::<String>()
}