mirror of
https://gitlab.com/gabmus/envision.git
synced 2025-09-03 08:06:42 +00:00
feat: display trait for DependencyCheckResult
This commit is contained in:
parent
f20d0c3d6a
commit
7e40e391fd
1 changed files with 14 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::{env, path::Path};
|
||||
use std::{env, fmt::Display, path::Path};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum DepType {
|
||||
|
@ -20,6 +20,19 @@ pub struct DependencyCheckResult {
|
|||
pub found: bool,
|
||||
}
|
||||
|
||||
impl Display for DependencyCheckResult {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
f.write_fmt(format_args!(
|
||||
"{name} {result}",
|
||||
name = self.dependency.name,
|
||||
result = match self.found {
|
||||
true => "Found",
|
||||
false => "Not found",
|
||||
}
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
fn shared_obj_paths() -> Vec<String> {
|
||||
vec![
|
||||
"/lib".to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue