<commit_before>use ra_db::SourceDatabase;
use ra_syntax::{
    AstNode, ast,
    algo::{find_covering_element, find_node_at_offset, ancestors_at_offset},
};
use hir::HirDisplay;

use crate::{
    db::RootDatabase,
    RangeInfo, FilePosition, FileRange,
    display::{rust_code_markup, doc_text_for},
};

/// Contains the results when hovering over an item
#[derive(Debug, Clone)]
pub struct HoverResult {
    results: Vec<String>,
    exact: bool,
}

impl HoverResult {
    pub fn new() -> HoverResult {
        HoverResult {
            results: Vec::new(),
            // We assume exact by default
            exact: true,
        }
    }

    pub fn extend(&mut self, item: Option<String>) {
        self.results.extend(item);<commit_msg>Fix clippy::new_without_default<commit_after>use ra_db::SourceDatabase;
use ra_syntax::{
    AstNode, ast,
    algo::{find_covering_element, find_node_at_offset, ancestors_at_offset},
};
use hir::HirDisplay;

use crate::{
    db::RootDatabase,
    RangeInfo, FilePosition, FileRange,
    display::{rust_code_markup, doc_text_for},
};

/// Contains the results when hovering over an item
#[derive(Debug, Clone)]
pub struct HoverResult {
    results: Vec<String>,
    exact: bool,
}

impl Default for HoverResult {
    fn default() -> Self {
        HoverResult::new()
    }
}

impl HoverResult {
    pub fn new() -> HoverResult {
        HoverResult {
            results: Vec::new(),
            // We assume exact by default
            exact: true,
        }
    }

    pub fn extend(&mut self, item: Option<String>) {
        self.results.extend(item);
{'fraction_non_alphanumeric': 0.12015018773466833, 'fraction_numerical': 0.0, 'mean_word_length': 3.007518796992481, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 10, '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': '1856850', 'n_tokens_mistral': 503, 'n_tokens_neox': 510, 'n_words': 126}