fn parse_title(node: &ElementRef, id: Id) -> Result<String, Box<dyn Error>> {
        let title = node.text()
            .next()
            .ok_or_else(|| {
                log::error!("Could not get score text for listing = {}", id);
                HnError::HtmlParsingError
            })?
            .to_string();

        Ok(title)
    }
// Note: This function queries against the title node
This function queries against the title node
This function queries against the title node
fn parse_title(node: &ElementRef, id: Id) -> Result<String, Box<dyn Error>> {
        let title = node.text()
            .next()
            .ok_or_else(|| {
                log::error!("Could not get score text for listing = {}", id);
                HnError::HtmlParsingError
            })?
            .to_string();
        Ok(title)
    }
fn parse_title ( node : & ElementRef , id : Id ) -> Result < String , Box < dyn Error > > { let title = node . text ( ) . next ( ) . ok_or_else ( | | { log :: error ! ( " " id ) ; HnError :: HtmlParsingError } ) ? . to_string ( ) ; Ok ( title ) }
Note: This function queries against the title node
Note : This function queries against the title node
node
&ElementRef
id
Id