Avoid unnecessary argument mutation in fluent_bundle
This commit is contained in:
parent
b54398e4ea
commit
0a679514d4
1 changed files with 4 additions and 4 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue