We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 255a0de commit 52f099bCopy full SHA for 52f099b
src/cargo/sources/registry/remote.rs
@@ -1,4 +1,5 @@
1
use std::cell::{RefCell, Ref, Cell};
2
+use std::fmt::Write as FmtWrite;
3
use std::io::SeekFrom;
4
use std::io::prelude::*;
5
use std::mem;
@@ -205,8 +206,7 @@ impl<'cfg> RegistryData for RemoteRegistry<'cfg> {
205
206
let config = self.config()?.unwrap();
207
let mut url = config.dl.clone();
208
if !url.contains(CRATE_TEMPLATE) && !url.contains(VERSION_TEMPLATE) {
- let suffix = format!("/{}/{}/download", CRATE_TEMPLATE, VERSION_TEMPLATE);
209
- url.push_str(&suffix);
+ write!(url, "/{}/{}/download", CRATE_TEMPLATE, VERSION_TEMPLATE).unwrap();
210
}
211
let url = url
212
.replace(CRATE_TEMPLATE, pkg.name())
0 commit comments