From f6fd6fdb6b6295bed911b9d6847466c2d34f9533 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 3 May 2021 12:58:47 +0100 Subject: [PATCH] bundles: Make bundles::Id more open Signed-off-by: Ian Jackson --- src/bundles.rs | 4 ++-- src/commands.rs | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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, }, */ -- 2.30.2