fn parse_user(node: &ElementRef, id: Id) -> Result<Option<String>, Box<dyn Error>> {
        let user_node = match node.select(&QS_LISTING_USER).next() {
            None => {
                log::info!("Failed to locate user node for listing. \
                This is probably a Jobs, Launch, or Poll listing. id = {}", id);
                return Ok(None);
            },
            Some(user_node) => user_node,
        };

        let user = user_node.text()
            .next()
            .ok_or_else(|| {
                log::error!("Failed to obtain user text from listing user node, id = {}", id);
                HnError::HtmlParsingError
            })?
            .to_string();

        Ok(Some(user))
    }
// Note: This function queries against the subtext node
This function queries against the subtext node
This function queries against the subtext node
fn parse_user(node: &ElementRef, id: Id) -> Result<Option<String>, Box<dyn Error>> {
        let user_node = match node.select(&QS_LISTING_USER).next() {
            None => {
                log::info!("Failed to locate user node for listing. \
                This is probably a Jobs, Launch, or Poll listing. id = {}", id);
                return Ok(None);
            },
            Some(user_node) => user_node,
        };
        let user = user_node.text()
            .next()
            .ok_or_else(|| {
                log::error!("Failed to obtain user text from listing user node, id = {}", id);
                HnError::HtmlParsingError
            })?
            .to_string();
        Ok(Some(user))
    }
fn parse_user ( node : & ElementRef , id : Id ) -> Result < Option < String > , Box < dyn Error > > { let user_node = match node . select ( & QS_LISTING_USER ) . next ( ) { None => { log :: info ! ( " \
 " id ) ; return Ok ( None ) ; } , Some ( user_node ) => user_node , } ; let user = user_node . text ( ) . next ( ) . ok_or_else ( | | { log :: error ! ( " " id ) ; HnError :: HtmlParsingError } ) ? . to_string ( ) ; Ok ( Some ( user ) ) }
Note: This function queries against the subtext node
Note : This function queries against the subtext node
node
&ElementRef
id
Id