chiark / gitweb /
bundles: Make bundles::Id more open
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 May 2021 11:58:47 +0000 (12:58 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 3 May 2021 11:58:47 +0000 (12:58 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/bundles.rs
src/commands.rs

index b8459b72ea9209e751e1db55fa49a028753ec4dd..10c5e9be3e1b16d7b57b982613949c7213ef3631 100644 (file)
@@ -19,7 +19,7 @@ pub enum Kind {
 }
 impl Kind { pub fn only() -> Self { Kind::Zip } }
 
-#[derive(Copy,Clone,Debug,Hash,PartialEq,Eq,Ord,PartialOrd)]
+#[derive(Copy,Clone,Default,Debug,Hash,PartialEq,Eq,Ord,PartialOrd)]
 #[derive(Serialize,Deserialize)]
 #[serde(transparent)]
 pub struct Index(u16);
@@ -47,7 +47,7 @@ const BUNDLES_MAX: Index = Index(64);
 
 #[derive(Copy,Clone,Debug,Hash,PartialEq,Eq,Ord,PartialOrd)]
 #[derive(Serialize,Deserialize)]
-pub struct Id { index: Index, kind: Kind, }
+pub struct Id { pub index: Index, pub kind: Kind, }
 
 #[derive(Debug,Clone)]
 pub struct InstanceBundles {
index 63c169acff8fa6add89258e1ba5f5fe79fcdb94c..15218613043c60e78428e146931eb2c31f064165 100644 (file)
@@ -52,8 +52,7 @@ pub enum MgmtCommand {
   /*
   DownloadBundle {
     game: InstanceName,
-    index: bundles::Index,
-    kind: bundles::Kind,
+    id: bundles::Id,
   },
   */