Use Data instead of Struct
Assisted-by: GLM-5.3 via pi
change uxwwwqosxvttzvtmtlxmrpnqpwpsmvps
commit 27f57576ca60f9ab34cd701892b28bf266fcaaf7
author Alpha Chen <alpha@kejadlen.dev>
date
parent qzwsvvks
diff --git a/lib/pro_tacts/contacts.rb b/lib/pro_tacts/contacts.rb
index 70c2e6d..43efc70 100644
--- a/lib/pro_tacts/contacts.rb
+++ b/lib/pro_tacts/contacts.rb
@@ -9,7 +9,7 @@ module ProTacts
   # The filename minus extension is the contact ID, which maps to the
   # vCard UID (see docs/plans/2026-01-12-carddav-architecture.md).
   class Contacts
-    Contact = Struct.new(:id, :vcard, keyword_init: true)
+    Contact = Data.define(:id, :vcard)
 
     # IDs end up in paths, and they arrive from client-supplied hrefs, so
     # anything outside this charset simply does not exist.
diff --git a/test/pro_tacts/exchange_fixtures.rb b/test/pro_tacts/exchange_fixtures.rb
index 72a5a2d..2fdf4db 100644
--- a/test/pro_tacts/exchange_fixtures.rb
+++ b/test/pro_tacts/exchange_fixtures.rb
@@ -8,8 +8,8 @@ require "rack/test"
 module ExchangeFixtures
   DIRECTORY = Pathname.new(__dir__).parent / "fixtures" / "macos-exchange"
 
-  Step = Struct.new(:name, :method, :path, :headers, :body, keyword_init: true)
-  Response = Struct.new(:status, :headers, :body, keyword_init: true)
+  Step = Data.define(:name, :method, :path, :headers, :body)
+  Response = Data.define(:status, :headers, :body)
 
   # Response headers worth snapshotting; everything else (Content-Length,
   # Date, server) is plumbing.