Fix review comments
This commit is contained in:
@@ -21,6 +21,7 @@ use intl_memoizer::concurrent::IntlLangMemoizer;
|
||||
use rustc_data_structures::sync::IntoDynSyncSend;
|
||||
use rustc_macros::{Decodable, Encodable};
|
||||
use rustc_span::Span;
|
||||
use smallvec::SmallVec;
|
||||
use tracing::{instrument, trace};
|
||||
pub use unic_langid::{LanguageIdentifier, langid};
|
||||
|
||||
@@ -106,8 +107,7 @@ impl From<Vec<FluentError>> for TranslationBundleError {
|
||||
/// (overriding any conflicting messages).
|
||||
#[instrument(level = "trace")]
|
||||
pub fn fluent_bundle(
|
||||
sysroot: PathBuf,
|
||||
default_sysroot: PathBuf,
|
||||
sysroot_candidates: SmallVec<[PathBuf; 2]>,
|
||||
requested_locale: Option<LanguageIdentifier>,
|
||||
additional_ftl_path: Option<&Path>,
|
||||
with_directionality_markers: bool,
|
||||
@@ -141,7 +141,7 @@ 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 mut sysroot in [sysroot, default_sysroot] {
|
||||
for mut sysroot in sysroot_candidates {
|
||||
sysroot.push("share");
|
||||
sysroot.push("locale");
|
||||
sysroot.push(requested_locale.to_string());
|
||||
|
||||
Reference in New Issue
Block a user