// Return the base URL with the given locale. If locale is None, return the
// client's default locale.
Return the base URL with the given locale. If locale is None, return the
client's default locale.
Return the base URL with the given locale . If locale is None return the client ' s default locale .
fn base_url_locale(&self, locale: Option<&Locale>) -> Result<Url, ParseError> {
        let url = format!(
            "https://{}.openfoodfacts.org/",
            locale.map_or(self.locale.to_string(), |l| l.to_string())
        );
        Url::parse(&url)
    }
fn base_url_locale ( & self , locale : Option < & Locale > ) -> Result < Url , ParseError > { let url = format ! ( " " locale map_or ( self locale to_string ( ) l l to_string ( ) ) ) ; Url :: parse ( & url ) }
Return the base URL with the given locale.
Return the base URL with the given locale .
&self
locale
Option<&Locale>