Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs test that uses networking #4882

Merged
merged 3 commits into from
May 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion provider/blob/src/export/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
//! // Export something
//! DatagenDriver::new()
//! .with_keys([icu_provider::hello_world::HelloWorldV1Marker::KEY])
//! .with_all_locales()
//! .with_locales_and_fallback([LocaleFamily::FULL], {
//! let mut options = FallbackOptions::default();
//! options.deduplication_strategy = Some(DeduplicationStrategy::None);
//! options
//! })
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion (optional): since BlobExporter does not support runtime fallback, DeduplicationStrategy::None is the default, so you don't need to set it explicitly here

//! .export(&icu_provider::hello_world::HelloWorldProvider, exporter)
//! .unwrap();
//!
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions provider/datagen/src/baked_exporter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
//! // Export something
//! DatagenDriver::new()
//! .with_keys([icu_provider::hello_world::HelloWorldV1Marker::KEY])
//! .with_all_locales()
//! .export(&DatagenProvider::new_latest_tested(), exporter)
//! .with_locales_and_fallback([LocaleFamily::FULL], {
//! let mut options = FallbackOptions::default();
//! options.deduplication_strategy = Some(DeduplicationStrategy::None);
//! options
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: set runtime_fallback_location to External here, and then deduplication_strategy will be inferred to be None.

//! })
//! .with_fallback_mode(FallbackMode::Hybrid)
robertbastian marked this conversation as resolved.
Show resolved Hide resolved
//! .export(&icu_provider::hello_world::HelloWorldProvider, exporter)
//! .unwrap();
//! #
//! # let _ = std::fs::remove_dir_all(&demo_path);
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ enum LocalesWithOrWithoutFallback {
///
/// DatagenDriver::new()
/// .with_keys([icu::list::provider::AndListV1Marker::KEY])
/// .with_all_locales()
/// .with_locales_and_fallback([LocaleFamily::FULL], Default::default())
/// .export(
/// &DatagenProvider::new_latest_tested(),
/// BlobExporter::new_with_sink(Box::new(&mut Vec::new())),
Expand Down
2 changes: 1 addition & 1 deletion provider/datagen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
//!
//! DatagenDriver::new()
//! .with_keys([icu::list::provider::AndListV1Marker::KEY])
//! .with_all_locales()
//! .with_locales_and_fallback([LocaleFamily::FULL], Default::default())
//! .export(
//! &DatagenProvider::new_latest_tested(),
//! BlobExporter::new_v2_with_sink(Box::new(
Expand Down
6 changes: 5 additions & 1 deletion provider/fs/src/export/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@
//! // Export something
//! DatagenDriver::new()
//! .with_keys([HelloWorldV1Marker::KEY])
//! .with_all_locales()
//! .with_locales_and_fallback([LocaleFamily::FULL], {
//! let mut options = FallbackOptions::default();
//! options.deduplication_strategy = Some(DeduplicationStrategy::None);
//! options
//! })
Copy link
Member

Choose a reason for hiding this comment

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

Suggestion: it should work fine with Default::default().

//! .export(&HelloWorldProvider, exporter)
//! .unwrap();
//! #
Expand Down
Loading