aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/package/link.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-19 00:10:22 +0900
committernsfisis <nsfisis@gmail.com>2026-05-19 00:11:03 +0900
commitc839244d8d09f3036ebfee8eef7eb6b147e593ab (patch)
treefe48c94f2c2e62468beef5ff1a8f3cff6adeef4f /crates/shirabe/src/package/link.rs
parent48839250146b217e2756ed3c0e624fd341b54d6c (diff)
downloadphp-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.gz
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.tar.zst
php-shirabe-c839244d8d09f3036ebfee8eef7eb6b147e593ab.zip
fix(compile): fix various compile errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/package/link.rs')
-rw-r--r--crates/shirabe/src/package/link.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/shirabe/src/package/link.rs b/crates/shirabe/src/package/link.rs
index 2233eb1..e41d431 100644
--- a/crates/shirabe/src/package/link.rs
+++ b/crates/shirabe/src/package/link.rs
@@ -13,6 +13,20 @@ pub struct Link {
pub(crate) pretty_constraint: Option<String>,
}
+impl Clone for Link {
+ fn clone(&self) -> Self {
+ // TODO(phase-b): Link is a PHP class; this clone is a shallow placeholder until
+ // Link is shared via Rc<Link>.
+ Self {
+ source: self.source.clone(),
+ target: self.target.clone(),
+ constraint: self.constraint.clone_box(),
+ description: self.description.clone(),
+ pretty_constraint: self.pretty_constraint.clone(),
+ }
+ }
+}
+
impl std::fmt::Debug for Link {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Link")