Skip to content

Commit

Permalink
move manifest module
Browse files Browse the repository at this point in the history
  • Loading branch information
liamkinne committed Jul 19, 2024
1 parent c0bb177 commit f72f9c1
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions src/manifest.rs → src/gateway/manifest.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use std::collections::HashMap;

use serde::Deserialize;
use std::collections::HashMap;

/// Manifest file format.
///
Expand Down Expand Up @@ -68,7 +67,6 @@ impl Manifest {
pub struct FirmwareBinary {
file: String,
min: String,
sha256: Option<String>,
}

impl FirmwareBinary {
Expand All @@ -81,9 +79,4 @@ impl FirmwareBinary {
pub fn minimum_supported_version(&self) -> &str {
&self.min
}

/// SHA256 checksum (if included).
pub fn sha256(&self) -> Option<&str> {
self.sha256.as_deref()
}
}
1 change: 1 addition & 0 deletions src/gateway/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
mod manifest;
mod restart;
mod status;
mod update;
Expand Down
2 changes: 1 addition & 1 deletion src/gateway/update.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::manifest::Manifest;
use super::UpdateOptions;
use crate::manifest::Manifest;
use crate::write_with_header;
use anyhow::Error;
use colored::Colorize;
Expand Down
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mod gateway;
mod manifest;

use clap::{Parser, Subcommand};
use colored::ColoredString;
Expand Down

0 comments on commit f72f9c1

Please sign in to comment.