<commit_before>use std::net::IpAddr;

use c_ares;

/// An owned version of `c_ares::HostResults`.
#[derive(Clone, Eq, PartialEq, Debug, Hash, PartialOrd, Ord)]
pub struct HostResults{
    hostname: String,
    addresses: Vec<IpAddr>,
    aliases: Vec<String>,
}

impl<'a> From<c_ares::HostResults<'a>> for HostResults {
    fn from(results: c_ares::HostResults) -> Self {
        HostResults {
            hostname: results.hostname().to_owned(),
            addresses: results.addresses().collect(),
            aliases: results.aliases().map(|s| s.to_owned()).collect(),
        }
    }
}
<commit_msg>Contents of HostResults need to be public<commit_after>use std::net::IpAddr;

use c_ares;

/// An owned version of `c_ares::HostResults`.
#[derive(Clone, Eq, PartialEq, Debug, Hash, PartialOrd, Ord)]
pub struct HostResults{
    /// The hostname returned by the lookup.
    pub hostname: String,

    /// The IP addresses returned by the lookup.
    pub addresses: Vec<IpAddr>,

    /// The aliases returned by the lookup.
    pub aliases: Vec<String>,
}

impl<'a> From<c_ares::HostResults<'a>> for HostResults {
    fn from(results: c_ares::HostResults) -> Self {
        HostResults {
            hostname: results.hostname().to_owned(),
            addresses: results.addresses().collect(),
            aliases: results.aliases().map(|s| s.to_owned()).collect(),
        }
    }
}

{'fraction_non_alphanumeric': 0.14574314574314573, 'fraction_numerical': 0.0, 'mean_word_length': 3.1526946107784433, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 15, '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': '4347461', 'n_tokens_mistral': 424, 'n_tokens_neox': 436, 'n_words': 110}