fn update_url_or_str(&mut self) {
        match self.url_or_str {
            UrlOrString::Url(url) => {
                let url = unsafe { url.as_mut().unwrap() };
                let mut pairs = url.url.query_pairs_mut();
                pairs.clear().extend_pairs(self.list.iter());
            }
            UrlOrString::Str(_) => {
                let str = form_urlencoded::Serializer::new(String::new())
                    .extend_pairs(&*self.list)
                    .finish();
                self.url_or_str = UrlOrString::Str(str);
            }
        }
    }
/// Update the associated Url object or string representation after params change.
/// Per WHATWG URL spec, the URL underlying a URLSearchParams object needs to be
/// updated as part of any mutations of the URLSearchParams.
/// Additionally, we keep around an updated string representation of the parameters.
/// This is used in `params_to_string` to hand out a stable reference.
Update the associated Url object or string representation after params change.
Per WHATWG URL spec, the URL underlying a URLSearchParams object needs to be
updated as part of any mutations of the URLSearchParams.
Additionally, we keep around an updated string representation of the parameters.
This is used in `params_to_string` to hand out a stable reference.
Update the associated Url object or string representation after params change . Per WHATWG URL spec the URL underlying a URLSearchParams object needs to be updated as part of any mutations of the URLSearchParams . Additionally we keep around an updated string representation of the parameters . This is used in ` params_to_string ` to hand out a stable reference .
fn update_url_or_str(&mut self) {
        match self.url_or_str {
            UrlOrString::Url(url) => {
                let url = unsafe { url.as_mut().unwrap() };
                let mut pairs = url.url.query_pairs_mut();
                pairs.clear().extend_pairs(self.list.iter());
            }
            UrlOrString::Str(_) => {
                let str = form_urlencoded::Serializer::new(String::new())
                    .extend_pairs(&*self.list)
                    .finish();
                self.url_or_str = UrlOrString::Str(str);
            }
        }
    }
fn update_url_or_str ( & mut self ) { match self . url_or_str { UrlOrString :: Url ( url ) => { let url = unsafe { url . as_mut ( ) . unwrap ( ) } ; let mut pairs = url . url . query_pairs_mut ( ) ; pairs . clear ( ) . extend_pairs ( self . list . iter ( ) ) ; } UrlOrString :: Str ( _ ) => { let str = form_urlencoded :: Serializer :: new ( String :: new ( ) ) . extend_pairs ( & * self . list ) . finish ( ) ; self . url_or_str = UrlOrString :: Str ( str ) ; } } }
Update the associated Url object or string representation after params change.
Update the associated Url object or string representation after params change .
&mut self
&mut self