Some cleanup and removing dead code warnings

This commit is contained in:
2019-01-21 15:21:43 +01:00
parent f7ba3ed3a6
commit 14f604283c
2 changed files with 5 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
/// Tag associated with ingredients
#[allow(dead_code)]
pub enum FoodTag {
Viande,
Poisson,
@@ -7,6 +8,7 @@ pub enum FoodTag {
}
/// Categories for recipe, to organize them for navigation and planning
#[allow(dead_code)]
pub enum RecipeCategory {
PetitDejeuner,
Entree,
@@ -23,6 +25,7 @@ struct NutritionnalValues;
/// An individual ingredient
#[derive(Default)]
#[allow(dead_code)]
pub struct Ingredient {
/// All known alias of a same ingredient
alias: Vec<String>,
@@ -33,7 +36,6 @@ pub struct Ingredient {
}
impl Ingredient {
/// Builds a brand new ingredient with given name as first alias
pub(super) fn new(name: String) -> Ingredient {
Ingredient {

View File

@@ -1,20 +1,4 @@
//! Storage backend for persistent data
//!
use std::collections::HashMap;
/// An entry in the storage
struct Entry<T>(T);
/// A storage container
pub struct Storage<T> {
content: HashMap<String, Entry<T>>,
}
impl<T> Storage<T> {
pub(super) fn insert(&mut self, item: T) -> Result<(), ()> {
Err(())
}
}
//! Data is stored in a sqlite file.
//! We'll try to use Diesel-rs, but not ready yet to grasp it all.