Skip to content

Commit

Permalink
Fix #64 add #[allow(missing_docs)] for internal funciton.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Oct 16, 2023
1 parent ba2c7cb commit c269c7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ fn generate_code(
/// I18n backend instance
///
/// [PUBLIC] This is a public API, and as an example in examples/
#[allow(missing_docs)]
static _RUST_I18N_BACKEND: rust_i18n::once_cell::sync::Lazy<Box<dyn rust_i18n::Backend>> = rust_i18n::once_cell::sync::Lazy::new(|| {
let mut backend = rust_i18n::SimpleBackend::new();
#(#all_translations)*
Expand All @@ -168,6 +169,7 @@ fn generate_code(

/// Get I18n text by locale and key
#[inline]
#[allow(missing_docs)]
pub fn _rust_i18n_translate(locale: &str, key: &str) -> String {
if let Some(value) = _RUST_I18N_BACKEND.translate(locale, key) {
return value.to_string();
Expand All @@ -186,6 +188,7 @@ fn generate_code(
return format!("{}.{}", locale, key);
}

#[allow(missing_docs)]
pub fn _rust_i18n_available_locales() -> Vec<&'static str> {
let mut locales = _RUST_I18N_BACKEND.available_locales();
locales.sort();
Expand Down

0 comments on commit c269c7c

Please sign in to comment.