Skip to content

Conversation

MilesCranmer
Copy link
Member

This also adds a new CI workflow that fails upon new clippy warnings

with:
components: clippy
- name: Run clippy
run: cargo clippy --all-targets --features ${{ matrix.features }} -- -D warnings
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this explain what the user needs to do to pass or just fail?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The clippy messages are pretty helpful, so I think the answer is yes

@IanButterworth IanButterworth merged commit 4d981b4 into JuliaLang:main Aug 26, 2025
28 checks passed
@IanButterworth
Copy link
Member

I don't know why but I get a lot more clippy failures locally using the same command.

It makes fixing this a bit annoying.

Any idea why? Is the version not constrained enough?

@MilesCranmer
Copy link
Member Author

Do you have an example? It might just be a different toolchain than

uses: actions-rust-lang/setup-rust-toolchain@v1

Or maybe you are enabling the windows features (or --all-features) despite not having windows locally?

@MilesCranmer MilesCranmer deleted the fix-clippy branch August 27, 2025 16:04
@IanButterworth
Copy link
Member

On macOS on #1237 which is currently passing clippy CI

% cargo clippy --all-targets --features selfupdate,binjuliainstaller,binjulialauncher -- -D 
warnings
warning: file `/Users/ian/Documents/GitHub/juliaup/src/bin/julialauncher.rs` found to be present in multiple build targets:
  * `bin` target `julia`
  * `bin` target `julialauncher`
   Compiling juliaup v1.17.21 (/Users/ian/Documents/GitHub/juliaup)
error: variables can be used directly in the `format!` string
  --> src/command_add.rs:62:9
   |
62 | /         format!(
63 | |             "Failed to save configuration file from `add` command after '{}' was installed.",
64 | |             channel
65 | |         )
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
   = note: `-D clippy::uninlined-format-args` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`

error: variables can be used directly in the `format!` string
  --> src/command_add.rs:74:14
   |
74 |             &format!("julia-{}", channel),
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
74 -             &format!("julia-{}", channel),
74 +             &format!("julia-{channel}"),
   |

error: variables can be used directly in the `format!` string
   --> src/command_add.rs:111:42
    |
111 |         create_symlink(&config_channel, &format!("julia-{}", channel), paths)?;
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
111 -         create_symlink(&config_channel, &format!("julia-{}", channel), paths)?;
111 +         create_symlink(&config_channel, &format!("julia-{channel}"), paths)?;
    |

error: variables can be used directly in the `format!` string
  --> src/command_api.rs:62:39
   |
62 | ...                   file: format!("alias-to-{}", target),
   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
62 -                                 file: format!("alias-to-{}", target),
62 +                                 file: format!("alias-to-{target}"),
   |

error: variables can be used directly in the `format!` string
  --> src/command_api.rs:64:42
   |
64 | ...                   version: format!("alias to {}", target),
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
64 -                                 version: format!("alias to {}", target),
64 +                                 version: format!("alias to {target}"),
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_modifypath.rs:37:21
   |
37 |                     eprintln!("Property 'modifypath' set to '{}'", value);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
37 -                     eprintln!("Property 'modifypath' set to '{}'", value);
37 +                     eprintln!("Property 'modifypath' set to '{value}'");
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_modifypath.rs:39:21
   |
39 |                     eprintln!("Property 'modifypath' is already set to '{}'", value);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
39 -                     eprintln!("Property 'modifypath' is already set to '{}'", value);
39 +                     eprintln!("Property 'modifypath' is already set to '{value}'");
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_symlinks.rs:27:50
   |
27 |                         create_symlink(channel, &format!("julia-{}", channel_name), paths)?;
   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
27 -                         create_symlink(channel, &format!("julia-{}", channel_name), paths)?;
27 +                         create_symlink(channel, &format!("julia-{channel_name}"), paths)?;
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_symlinks.rs:29:41
   |
29 |                         remove_symlink(&format!("julia-{}", channel_name))?;
   |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
29 -                         remove_symlink(&format!("julia-{}", channel_name))?;
29 +                         remove_symlink(&format!("julia-{channel_name}"))?;
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_symlinks.rs:39:21
   |
39 |                     eprintln!("Property 'channelsymlinks' set to '{}'", value);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
39 -                     eprintln!("Property 'channelsymlinks' set to '{}'", value);
39 +                     eprintln!("Property 'channelsymlinks' set to '{value}'");
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_symlinks.rs:41:21
   |
41 |                     eprintln!("Property 'channelsymlinks' is already set to '{}'", value);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
41 -                     eprintln!("Property 'channelsymlinks' is already set to '{}'", value);
41 +                     eprintln!("Property 'channelsymlinks' is already set to '{value}'");
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_versionsdbupdate.rs:31:21
   |
31 |                     eprintln!("Property 'versionsdbupdateinterval' set to '{}'", value);
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
31 -                     eprintln!("Property 'versionsdbupdateinterval' set to '{}'", value);
31 +                     eprintln!("Property 'versionsdbupdateinterval' set to '{value}'");
   |

error: variables can be used directly in the `format!` string
  --> src/command_config_versionsdbupdate.rs:33:21
   |
33 | /                     eprintln!(
34 | |                         "Property 'versionsdbupdateinterval' is already set to '{}'",
35 | |                         value
36 | |                     );
   | |_____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_default.rs:29:5
   |
29 |     eprintln!("Configured the default Julia version to be '{}'.", channel);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
29 -     eprintln!("Configured the default Julia version to be '{}'.", channel);
29 +     eprintln!("Configured the default Julia version to be '{channel}'.");
   |

error: variables can be used directly in the `format!` string
  --> src/command_info.rs:48:13
   |
48 | /             format!(
49 | |                 "Failed to construct a valid url from '{}' and '{}'.",
50 | |                 juliaupserver_base, dbversion_url_path
51 | |             )
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_info.rs:80:5
   |
80 |     println!("Bundled version db: {}", bundled_dbversion);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
80 -     println!("Bundled version db: {}", bundled_dbversion);
80 +     println!("Bundled version db: {bundled_dbversion}");
   |

error: variables can be used directly in the `format!` string
  --> src/command_info.rs:81:5
   |
81 |     println!("Online version db: {}", online_dbversion);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
81 -     println!("Online version db: {}", online_dbversion);
81 +     println!("Online version db: {online_dbversion}");
   |

error: variables can be used directly in the `format!` string
  --> src/command_info.rs:82:5
   |
82 |     println!("Local version db: {:?}", local_dbversion);
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
82 -     println!("Local version db: {:?}", local_dbversion);
82 +     println!("Local version db: {local_dbversion:?}");
   |

error: variables can be used directly in the `format!` string
  --> src/command_selfchannel.rs:25:13
   |
25 | ...   println!("Your juliaup is currently on channel `{}`. Run `juliaup self channel -h` for help on how to set the juliaup channel.", channel_name);
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
25 -             println!("Your juliaup is currently on channel `{}`. Run `juliaup self channel -h` for help on how to set the juliaup channel.", channel_name);
25 +             println!("Your juliaup is currently on channel `{channel_name}`. Run `juliaup self channel -h` for help on how to set the juliaup channel.");
   |

error: variables can be used directly in the `format!` string
  --> src/command_selfuninstall.rs:61:9
   |
61 |         eprint!("Deleting julia symlink {:?}.", julia_symlink_path);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
61 -         eprint!("Deleting julia symlink {:?}.", julia_symlink_path);
61 +         eprint!("Deleting julia symlink {julia_symlink_path:?}.");
   |

error: variables can be used directly in the `format!` string
  --> src/command_selfuninstall.rs:67:9
   |
67 |         eprint!("Deleting julialauncher binary {:?}.", julialauncher_path);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
67 -         eprint!("Deleting julialauncher binary {:?}.", julialauncher_path);
67 +         eprint!("Deleting julialauncher binary {julialauncher_path:?}.");
   |

error: variables can be used directly in the `format!` string
  --> src/command_selfuninstall.rs:73:9
   |
73 |         eprint!("Deleting juliaup binary {:?}.", juliaup_path);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
73 -         eprint!("Deleting juliaup binary {:?}.", juliaup_path);
73 +         eprint!("Deleting juliaup binary {juliaup_path:?}.");
   |

error: variables can be used directly in the `format!` string
  --> src/command_selfuninstall.rs:80:13
   |
80 | /             eprint!(
81 | |                 "Deleting the Juliaup bin folder {:?}.",
82 | |                 juliaup_binfolder_path
83 | |             );
   | |_____________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_selfuninstall.rs:88:21
   |
88 | /                     eprint!(
89 | |                         "Deleting the Juliaup configuration file {:?}.",
90 | |                         juliaup_config_path
91 | |                     );
   | |_____________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/command_selfuninstall.rs:112:13
    |
112 | ...   eprintln!("The Juliaup bin folder {:?} is not empty, skipping removal of the entire Juliaup folder.", juliaup_binfolder_path);
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
112 -             eprintln!("The Juliaup bin folder {:?} is not empty, skipping removal of the entire Juliaup folder.", juliaup_binfolder_path);
112 +             eprintln!("The Juliaup bin folder {juliaup_binfolder_path:?} is not empty, skipping removal of the entire Juliaup folder.");
    |

error: variables can be used directly in the `format!` string
  --> src/command_selfupdate.rs:39:9
   |
39 | /         format!(
40 | |             "Failed to construct a valid url from '{}' and '{}'.",
41 | |             juliaupserver_base, version_url_path
42 | |         )
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_selfupdate.rs:52:9
   |
52 | /         eprintln!(
53 | |             "Juliaup unchanged on channel '{}' - {}",
54 | |             juliaup_channel, version
55 | |         );
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_selfupdate.rs:63:13
   |
63 |             format!("juliaup/bin/juliaup-{}-{}.tar.gz", version, juliaup_target);
   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
63 -             format!("juliaup/bin/juliaup-{}-{}.tar.gz", version, juliaup_target);
63 +             format!("juliaup/bin/juliaup-{version}-{juliaup_target}.tar.gz");
   |

error: variables can be used directly in the `format!` string
  --> src/command_selfupdate.rs:68:17
   |
68 | /                 format!(
69 | |                     "Failed to construct a valid url from '{}' and '{}'.",
70 | |                     juliaupserver_base, download_url_path
71 | |                 )
   | |_________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_selfupdate.rs:81:9
   |
81 | /         eprintln!(
82 | |             "Found new version {} on channel {}.",
83 | |             version, juliaup_channel
84 | |         );
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/command_selfupdate.rs:87:9
   |
87 |         eprintln!("Updated Juliaup to version {}.", version);
   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
87 -         eprintln!("Updated Juliaup to version {}.", version);
87 +         eprintln!("Updated Juliaup to version {version}.");
   |

error: variables can be used directly in the `format!` string
  --> src/command_update.rs:77:30
   |
77 | ...                   &format!("julia-{}", channel),
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
77 -                             &format!("julia-{}", channel),
77 +                             &format!("julia-{channel}"),
   |

error: variables can be used directly in the `format!` string
  --> src/command_update.rs:83:17
   |
83 | ...   eprintln!("Skipping update for '{}' channel, it no longer exists in the version database.", channel);
   |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
83 -                 eprintln!("Skipping update for '{}' channel, it no longer exists in the version database.", channel);
83 +                 eprintln!("Skipping update for '{channel}' channel, it no longer exists in the version database.");
   |

error: variables can be used directly in the `format!` string
   --> src/command_update.rs:119:21
    |
119 | / ...   eprintln!(
120 | | ...       "Channel {} version is empty, you may need to manually codesign this channel if you trust the conten...
121 | | ...       channel
122 | | ...   );
    | |_______^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/command_update.rs:179:34
    |
179 |                 .with_context(|| format!("Failed to resolve channel '{}'", channel))?;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
179 -                 .with_context(|| format!("Failed to resolve channel '{}'", channel))?;
179 +                 .with_context(|| format!("Failed to resolve channel '{channel}'"))?;
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:101:5
    |
101 |     log::debug!("Downloading from url `{}`.", url);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
101 -     log::debug!("Downloading from url `{}`.", url);
101 +     log::debug!("Downloading from url `{url}`.");
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:103:26
    |
103 |         .with_context(|| format!("Failed to download from url `{}`.", url))?;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
103 -         .with_context(|| format!("Failed to download from url `{}`.", url))?;
103 +         .with_context(|| format!("Failed to download from url `{url}`."))?;
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:131:26
    |
131 |         .with_context(|| format!("Failed to extract downloaded file from url `{}`.", url))?;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
131 -         .with_context(|| format!("Failed to extract downloaded file from url `{}`.", url))?;
131 +         .with_context(|| format!("Failed to extract downloaded file from url `{url}`."))?;
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:230:26
    |
230 |         .with_context(|| format!("Failed to download from url `{}`.", url))?
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
230 -         .with_context(|| format!("Failed to download from url `{}`.", url))?
230 +         .with_context(|| format!("Failed to download from url `{url}`."))?
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:236:9
    |
236 | /         format!(
237 | |             "`download_juliaup_version` failed to parse `{}` as a valid semversion.",
238 | |             trimmed_response
239 | |         )
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:248:26
    |
248 |         .with_context(|| format!("Failed to download from url `{}`.", url))?;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
248 -         .with_context(|| format!("Failed to download from url `{}`.", url))?;
248 +         .with_context(|| format!("Failed to download from url `{url}`."))?;
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:255:26
    |
255 |         .with_context(|| format!("Failed to open or create version db file at {:?}", path))?;
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
255 -         .with_context(|| format!("Failed to open or create version db file at {:?}", path))?;
255 +         .with_context(|| format!("Failed to open or create version db file at {path:?}"))?;
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:339:35
    |
339 |     let child_target_foldername = format!("julia-{}", fullversion);
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
339 -     let child_target_foldername = format!("julia-{}", fullversion);
339 +     let child_target_foldername = format!("julia-{fullversion}");
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:366:17
    |
366 | /                 format!(
367 | |                     "Failed to construct a valid url from '{}' and '{}'.",
368 | |                     juliaupserver_base, download_url_path
369 | |                 )
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:429:13
    |
429 |             eprintln!("failed with {}.", exit_status);
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
429 -             eprintln!("failed with {}.", exit_status);
429 +             eprintln!("failed with {exit_status}.");
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:484:29
    |
484 |                 .map(|arch| format!("{}~{}", channel, arch)),
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
484 -                 .map(|arch| format!("{}~{}", channel, arch)),
484 +                 .map(|arch| format!("{channel}~{arch}")),
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:527:13
    |
527 |             format!("{}-latest", version_prefix)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
527 -             format!("{}-latest", version_prefix)
527 +             format!("{version_prefix}-latest")
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:665:13
    |
665 |             format!("/{}", nightly_version) // Use version as folder
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
665 -             format!("/{}", nightly_version) // Use version as folder
665 +             format!("/{nightly_version}") // Use version as folder
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:668:34
    |
668 |               "macos-x86_64" => Ok(format!(
    |  __________________________________^
669 | |                 "bin/macos/x86_64{}/julia-latest-macos-x86_64.tar.gz",
670 | |                 nightly_folder
671 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:672:35
    |
672 |               "macos-aarch64" => Ok(format!(
    |  ___________________________________^
673 | |                 "bin/macos/aarch64{}/julia-latest-macos-aarch64.tar.gz",
674 | |                 nightly_folder
675 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:676:27
    |
676 |               "win64" => Ok(format!(
    |  ___________________________^
677 | |                 "bin/winnt/x64{}/julia-latest-win64.tar.gz",
678 | |                 nightly_folder
679 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:680:27
    |
680 |               "win32" => Ok(format!(
    |  ___________________________^
681 | |                 "bin/winnt/x86{}/julia-latest-win32.tar.gz",
682 | |                 nightly_folder
683 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:684:34
    |
684 |               "linux-x86_64" => Ok(format!(
    |  __________________________________^
685 | |                 "bin/linux/x86_64{}/julia-latest-linux-x86_64.tar.gz",
686 | |                 nightly_folder
687 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:688:32
    |
688 |               "linux-i686" => Ok(format!(
    |  ________________________________^
689 | |                 "bin/linux/i686{}/julia-latest-linux-i686.tar.gz",
690 | |                 nightly_folder
691 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:692:35
    |
692 |               "linux-aarch64" => Ok(format!(
    |  ___________________________________^
693 | |                 "bin/linux/aarch64{}/julia-latest-linux-aarch64.tar.gz",
694 | |                 nightly_folder
695 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:696:36
    |
696 |               "freebsd-x86_64" => Ok(format!(
    |  ____________________________________^
697 | |                 "bin/freebsd/x86_64{}/julia-latest-freebsd-x86_64.tar.gz",
698 | |                 nightly_folder
699 | |             )),
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:730:13
    |
730 | /             format!(
731 | |                 "Failed to construct a valid url from '{}' and '{}'.",
732 | |                 download_url_base, download_url_path
733 | |             )
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
   --> src/operations.rs:736:35
    |
736 |     let child_target_foldername = format!("julia-{}", channel);
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
736 -     let child_target_foldername = format!("julia-{}", channel);
736 +     let child_target_foldername = format!("julia-{channel}");
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:868:43
    |
868 |             let child_target_foldername = format!("julia-{}", version);
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
    |
868 -             let child_target_foldername = format!("julia-{}", version);
868 +             let child_target_foldername = format!("julia-{version}");
    |

error: variables can be used directly in the `format!` string
   --> src/operations.rs:955:17
    |
955 | /                 format!(
956 | |                     r#"#!/bin/sh
957 | | {} "$@"
958 | | "#,
959 | |                     formatted_command,
960 | |                 ),
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1020:22
     |
1020 |                     &format!("Juliaup self update for WSL {} distribution", val),
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
     |
1020 -                     &format!("Juliaup self update for WSL {} distribution", val),
1020 +                     &format!("Juliaup self update for WSL {val} distribution"),
     |

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1024:22
     |
1024 |                     &format!("wsl --distribution {} {} self update", val, my_own_path),
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
     |
1024 -                     &format!("wsl --distribution {} {} self update", val, my_own_path),
1024 +                     &format!("wsl --distribution {val} {my_own_path} self update"),
     |

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1039:22
     |
1039 |                       &format!(
     |  ______________________^
1040 | |                         "*/{} * * * * {} 4c79c12db1d34bbbab1f6c6f838f423f",
1041 | |                         interval, my_own_path
1042 | |                     ),
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1078:22
     |
1078 |                     &format!("Juliaup self update for WSL {} distribution", val),
     |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
     |
1078 -                     &format!("Juliaup self update for WSL {} distribution", val),
1078 +                     &format!("Juliaup self update for WSL {val} distribution"),
     |

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1391:13
     |
1391 | /             format!(
1392 | |                 "Failed to construct a valid url from '{}' and '{}'.",
1393 | |                 juliaupserver_base, dbversion_url_path
1394 | |             )
     | |_____________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1418:17
     |
1418 | /                 format!(
1419 | |                     "Failed to download new version db from {}.",
1420 | |                     onlineversiondburl
1421 | |                 )
     | |_________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1519:13
     |
1519 |             eprintln!("{}", message);
     |             ^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
     |
1519 -             eprintln!("{}", message);
1519 +             eprintln!("{message}");
     |

error: variables can be used directly in the `format!` string
    --> src/operations.rs:1525:19
     |
1525 |         Err(e) => panic!("Error receiving result: {:?}", e),
     |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
     |
1525 -         Err(e) => panic!("Error receiving result: {:?}", e),
1525 +         Err(e) => panic!("Error receiving result: {e:?}"),
     |

error: variables can be used directly in the `format!` string
  --> src/utils.rs:11:13
   |
11 |             format!("{}/", val)
   |             ^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
11 -             format!("{}/", val)
11 +             format!("{val}/")
   |

error: variables can be used directly in the `format!` string
  --> src/utils.rs:18:9
   |
18 | /         format!(
19 | |             "Failed to parse the value of JULIAUP_SERVER '{}' as a uri.",
20 | |             base_url
21 | |         )
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: variables can be used directly in the `format!` string
  --> src/utils.rs:32:13
   |
32 |             format!("{}/", val)
   |             ^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
help: change this to
   |
32 -             format!("{}/", val)
32 +             format!("{val}/")
   |

error: variables can be used directly in the `format!` string
  --> src/utils.rs:39:9
   |
39 | /         format!(
40 | |             "Failed to parse the value of JULIAUP_NIGHTLY_SERVER '{}' as a uri.",
41 | |             base_url
42 | |         )
   | |_________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

error: could not compile `juliaup` (lib test) due to 72 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `juliaup` (lib) due to 72 previous errors

@MilesCranmer
Copy link
Member Author

Maybe your rust toolchain is older or something? I can't reproduce:

image

@MilesCranmer
Copy link
Member Author

MilesCranmer commented Aug 27, 2025

Actually maybe your rust toolchain is newer? The message "error: variables can be used directly in the format! string" sounds like a new feature.

I'm on stable

@MilesCranmer
Copy link
Member Author

Oh wait I have that lint too. But it's not enabled by default, I have to explicitly turn it on. Do you have a clippy config or something that enables the stricter ones?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants