From 6c634824a848a31d376589ca0222a4e47c1ed378 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Mon, 16 Mar 2026 23:00:42 +0100 Subject: [PATCH] added custom debug impl for Link --- src/types/link.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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,) + } +}