<commit_before>pub type QueryPair = (String, String);

pub trait QueryString {
    fn as_query_kv(&self) -> Vec<QueryPair>;

    fn as_query(&self) -> String {
        let params: Vec<String> = self.as_query_kv().iter()
            .map(|&(ref k, ref v)| format!("{}={}", k, v))
            .collect();

        format!("?{}", params.join("&"))
    }
}

pub trait QueryParameter {
    fn as_query_kv(&self, &str) -> Vec<QueryPair>;
}<commit_msg>Fix double `?` in query string<commit_after>pub type QueryPair = (String, String);

pub trait QueryString {
    fn as_query_kv(&self) -> Vec<QueryPair>;

    fn as_query(&self) -> String {
        self.as_query_kv().iter()
            .map(|&(ref k, ref v)| format!("{}={}", k, v))
            .collect::<Vec<String>>()
            .join("&")
    }
}

pub trait QueryParameter {
    fn as_query_kv(&self, &str) -> Vec<QueryPair>;
}
{'fraction_non_alphanumeric': 0.19292237442922375, 'fraction_numerical': 0.0, 'mean_word_length': 2.8130434782608695, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 16, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4686653', 'n_tokens_mistral': 298, 'n_tokens_neox': 299, 'n_words': 70}