diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-07 16:58:01 +0100 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-03-12 15:05:24 +0000 |
| commit | 0a679514d41443329c183110a4142e6813bc4307 (patch) | |
| tree | b344ca9eba2236c251c3f897756d999a25ec7d9f /compiler/rustc_error_messages | |
| parent | b54398e4ea9188b0ccf60105e15ea5f2ed723edd (diff) | |
| download | rust-0a679514d41443329c183110a4142e6813bc4307.tar.gz rust-0a679514d41443329c183110a4142e6813bc4307.zip | |
Avoid unnecessary argument mutation in fluent_bundle
Diffstat (limited to 'compiler/rustc_error_messages')
| -rw-r--r-- | compiler/rustc_error_messages/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_error_messages/src/lib.rs b/compiler/rustc_error_messages/src/lib.rs index 56adc583ac4..aa83ddf8d1f 100644 --- a/compiler/rustc_error_messages/src/lib.rs +++ b/compiler/rustc_error_messages/src/lib.rs @@ -107,8 +107,8 @@ impl From<Vec<FluentError>> for TranslationBundleError { /// (overriding any conflicting messages). #[instrument(level = "trace")] pub fn fluent_bundle( - mut user_provided_sysroot: PathBuf, - mut sysroot_candidates: Vec<PathBuf>, + user_provided_sysroot: PathBuf, + sysroot_candidates: Vec<PathBuf>, requested_locale: Option<LanguageIdentifier>, additional_ftl_path: Option<&Path>, with_directionality_markers: bool, @@ -142,8 +142,8 @@ pub fn fluent_bundle( // If the user requests the default locale then don't try to load anything. if let Some(requested_locale) = requested_locale { let mut found_resources = false; - for sysroot in - Some(&mut user_provided_sysroot).into_iter().chain(sysroot_candidates.iter_mut()) + for mut sysroot in + Some(user_provided_sysroot).into_iter().chain(sysroot_candidates.into_iter()) { sysroot.push("share"); sysroot.push("locale"); |
