Bug 1773733 - Rename set_adapt_bundle to set_bundle_adapter; r=nordzilla

Differential Revision: https://phabricator.services.mozilla.com/D159437
This commit is contained in:
Greg Tatum 2022-10-19 21:17:28 +00:00
Родитель 46e83c75bf
Коммит f5418b7733
3 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -110,7 +110,7 @@ fn create_l10n_registry(sources: Option<Vec<FileSource>>) -> Rc<GeckoL10nRegistr
let env = GeckoEnvironment::new(None);
let mut reg = L10nRegistry::with_provider(env);
reg.set_adapt_bundle(GeckoBundleAdapter::default())
reg.set_bundle_adapter(GeckoBundleAdapter::default())
.expect("Failed to set bundle adaptation closure.");
if let Some(sources) = sources {
@ -175,10 +175,13 @@ pub struct GeckoResourceId {
impl From<&GeckoResourceId> for ResourceId {
fn from(resource_id: &GeckoResourceId) -> Self {
resource_id.value.to_string().to_resource_id(match resource_id.resource_type {
GeckoResourceType::Optional => ResourceType::Optional,
GeckoResourceType::Required => ResourceType::Required,
})
resource_id
.value
.to_string()
.to_resource_id(match resource_id.resource_type {
GeckoResourceType::Optional => ResourceType::Optional,
GeckoResourceType::Required => ResourceType::Required,
})
}
}
@ -194,7 +197,7 @@ pub extern "C" fn l10nregistry_new(use_isolating: bool) -> *const GeckoL10nRegis
let env = GeckoEnvironment::new(None);
let mut reg = L10nRegistry::with_provider(env);
let _ = reg
.set_adapt_bundle(GeckoBundleAdapter { use_isolating })
.set_bundle_adapter(GeckoBundleAdapter { use_isolating })
.report_error();
Rc::into_raw(Rc::new(reg))
}

Просмотреть файл

@ -91,7 +91,7 @@ impl<P, B> L10nRegistry<P, B> {
}
}
pub fn set_adapt_bundle(&mut self, bundle_adapter: B) -> Result<(), L10nRegistrySetupError>
pub fn set_bundle_adapter(&mut self, bundle_adapter: B) -> Result<(), L10nRegistrySetupError>
where
B: BundleAdapter,
{

Просмотреть файл

@ -239,7 +239,7 @@ impl TestFileFetcher {
})
.collect();
reg.register_sources(sources).unwrap();
reg.set_adapt_bundle(bundle_adapter)
reg.set_bundle_adapter(bundle_adapter)
.expect("Failed to set bundle adapter.");
(provider, reg)
}