From 46a25581aae5815382aa9291ec7071aafbfea7ba Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sun, 16 Apr 2023 21:36:05 +0200 Subject: [PATCH] Extract variable --- src/bootstrap/bootstrap.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 9e4c0d2b167..30613e47cbd 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -438,11 +438,12 @@ class RustBuild(object): tarball_suffix = '.tar.gz' if lzma is None else '.tar.xz' + toolchain_suffix = "{}-{}{}".format(rustc_channel, self.build, tarball_suffix) + tarballs_to_download = [ - ("rust-std-{}-{}{}".format(rustc_channel, self.build, tarball_suffix), - "rust-std-{}".format(self.build)), - ("rustc-{}-{}{}".format(rustc_channel, self.build, tarball_suffix), "rustc"), - ("cargo-{}-{}{}".format(rustc_channel, self.build, tarball_suffix), "cargo"), + ("rust-std-{}".format(toolchain_suffix), "rust-std-{}".format(self.build)), + ("rustc-{}".format(toolchain_suffix), "rustc"), + ("cargo-{}".format(toolchain_suffix), "cargo"), ] for filename, pattern in tarballs_to_download: