From: Ian Jackson Date: Mon, 3 May 2021 11:58:47 +0000 (+0100) Subject: bundles: Make bundles::Id more open X-Git-Tag: otter-0.6.0~453 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=f6fd6fdb6b6295bed911b9d6847466c2d34f9533;p=otter.git bundles: Make bundles::Id more open Signed-off-by: Ian Jackson --- diff --git a/src/bundles.rs b/src/bundles.rs index b8459b72..10c5e9be 100644 --- a/src/bundles.rs +++ b/src/bundles.rs @@ -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 { diff --git a/src/commands.rs b/src/commands.rs index 63c169ac..15218613 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -52,8 +52,7 @@ pub enum MgmtCommand { /* DownloadBundle { game: InstanceName, - index: bundles::Index, - kind: bundles::Kind, + id: bundles::Id, }, */