use super::{Diagnostic, RelatedExecutableHint, ResolutionCandidate};
#[derive(Clone, Debug, Eq, PartialEq)]
pub struct WhyNotReport {
pub command: String,
pub candidates: Vec<ResolutionCandidate>,
pub searched_directories: Vec<String>,
pub related_hints: Vec<RelatedExecutableHint>,
pub path_diagnostics: Vec<Diagnostic>,
pub advice: Vec<String>,
}
impl WhyNotReport {
#[must_use]
pub fn found(&self) -> bool {
self.winner().is_some()
}
#[must_use]
pub fn winner(&self) -> Option<&ResolutionCandidate> {
self.candidates.iter().find(|candidate| candidate.wins)
}
}