diff --git a/src/types/link.rs b/src/types/link.rs index 6f51afc..078ace1 100644 --- a/src/types/link.rs +++ b/src/types/link.rs @@ -1,11 +1,14 @@ -use std::path::{Path, PathBuf}; +use std::{ + fmt::Debug, + path::{Path, PathBuf}, +}; use serde::{Deserialize, Serialize}; use crate::types::mod_file::ModFile; /// A link between a file from a mod and a destination in a ModdedInstance -#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, Hash)] +#[derive(Clone, Deserialize, Serialize, PartialEq, Eq, Hash)] #[serde(from = "(PathBuf, PathBuf)", into = "(PathBuf,PathBuf)")] pub struct Link { src: PathBuf, @@ -53,3 +56,9 @@ impl From for Link { Self::new(value.src(), value.dst()) } } + +impl Debug for Link { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(f, "Link{{{:?} -> {:?}}}", self.src, self.dst,) + } +}