@@ -44,7 +44,7 @@ struct PlatformInfo {
4444/// Run the upgrade process
4545pub fn run_upgrade ( force : bool , target_version : Option < String > , dry_run : bool ) -> Result < ( ) > {
4646 println ! ( "🚀 Andromeda Upgrade Tool" ) ;
47- println ! ( "Current version: {}" , CURRENT_VERSION ) ;
47+ println ! ( "Current version: {CURRENT_VERSION}" ) ;
4848 println ! ( ) ;
4949
5050 let platform = detect_platform ( ) ?;
@@ -64,10 +64,7 @@ pub fn run_upgrade(force: bool, target_version: Option<String>, dry_run: bool) -
6464 }
6565
6666 if release. tag_name == CURRENT_VERSION && !force {
67- println ! (
68- "ℹ️ You are already on version {}. Use --force to reinstall." ,
69- CURRENT_VERSION
70- ) ;
67+ println ! ( "ℹ️ You are already on version {CURRENT_VERSION}. Use --force to reinstall." ) ;
7168 return Ok ( ( ) ) ;
7269 }
7370
@@ -143,9 +140,9 @@ fn detect_platform() -> Result<PlatformInfo> {
143140 } ;
144141
145142 let asset_name = if os == "windows" {
146- format ! ( "andromeda-{}-{}.exe" , os , arch )
143+ format ! ( "andromeda-{os }-{arch }.exe" )
147144 } else {
148- format ! ( "andromeda-{}-{}" , os , arch )
145+ format ! ( "andromeda-{os }-{arch}" )
149146 } ;
150147
151148 Ok ( PlatformInfo {
@@ -157,13 +154,10 @@ fn detect_platform() -> Result<PlatformInfo> {
157154
158155/// Get the latest release from GitHub
159156fn get_latest_release ( ) -> Result < GitHubRelease > {
160- let url = format ! (
161- "https://api.github.com/repos/{}/{}/releases/latest" ,
162- REPO_OWNER , REPO_NAME
163- ) ;
157+ let url = format ! ( "https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/releases/latest" ) ;
164158
165159 let response = ureq:: get ( & url)
166- . header ( "User-Agent" , & format ! ( "andromeda-cli/{}" , CURRENT_VERSION ) )
160+ . header ( "User-Agent" , & format ! ( "andromeda-cli/{CURRENT_VERSION}" ) )
167161 . call ( ) ;
168162
169163 match response {
@@ -183,13 +177,10 @@ fn get_latest_release() -> Result<GitHubRelease> {
183177
184178/// Get the most recent release (including drafts and prereleases)
185179fn get_most_recent_release ( ) -> Result < GitHubRelease > {
186- let url = format ! (
187- "https://api.github.com/repos/{}/{}/releases" ,
188- REPO_OWNER , REPO_NAME
189- ) ;
180+ let url = format ! ( "https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/releases" ) ;
190181
191182 let mut response = ureq:: get ( & url)
192- . header ( "User-Agent" , & format ! ( "andromeda-cli/{}" , CURRENT_VERSION ) )
183+ . header ( "User-Agent" , & format ! ( "andromeda-cli/{CURRENT_VERSION}" ) )
193184 . call ( )
194185 . context ( "Failed to fetch releases" ) ?;
195186
@@ -206,13 +197,10 @@ fn get_most_recent_release() -> Result<GitHubRelease> {
206197
207198/// Get a specific release by tag
208199fn get_release_by_tag ( tag : & str ) -> Result < GitHubRelease > {
209- let url = format ! (
210- "https://api.github.com/repos/{}/{}/releases/tags/{}" ,
211- REPO_OWNER , REPO_NAME , tag
212- ) ;
200+ let url = format ! ( "https://api.github.com/repos/{REPO_OWNER}/{REPO_NAME}/releases/tags/{tag}" ) ;
213201
214202 let mut response = ureq:: get ( & url)
215- . header ( "User-Agent" , & format ! ( "andromeda-cli/{}" , CURRENT_VERSION ) )
203+ . header ( "User-Agent" , & format ! ( "andromeda-cli/{CURRENT_VERSION}" ) )
216204 . call ( )
217205 . context ( "Failed to fetch release information" ) ?;
218206
@@ -227,7 +215,7 @@ fn get_release_by_tag(tag: &str) -> Result<GitHubRelease> {
227215/// Download an asset from the given URL
228216fn download_asset ( url : & str ) -> Result < Vec < u8 > > {
229217 let mut response = ureq:: get ( url)
230- . header ( "User-Agent" , & format ! ( "andromeda-cli/{}" , CURRENT_VERSION ) )
218+ . header ( "User-Agent" , & format ! ( "andromeda-cli/{CURRENT_VERSION}" ) )
231219 . call ( )
232220 . context ( "Failed to download asset" ) ?;
233221
0 commit comments