Some cleanup and removing dead code warnings
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
|
|
||||||
/// Tag associated with ingredients
|
/// Tag associated with ingredients
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum FoodTag {
|
pub enum FoodTag {
|
||||||
Viande,
|
Viande,
|
||||||
Poisson,
|
Poisson,
|
||||||
@@ -7,6 +8,7 @@ pub enum FoodTag {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Categories for recipe, to organize them for navigation and planning
|
/// Categories for recipe, to organize them for navigation and planning
|
||||||
|
#[allow(dead_code)]
|
||||||
pub enum RecipeCategory {
|
pub enum RecipeCategory {
|
||||||
PetitDejeuner,
|
PetitDejeuner,
|
||||||
Entree,
|
Entree,
|
||||||
@@ -23,6 +25,7 @@ struct NutritionnalValues;
|
|||||||
|
|
||||||
/// An individual ingredient
|
/// An individual ingredient
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
|
#[allow(dead_code)]
|
||||||
pub struct Ingredient {
|
pub struct Ingredient {
|
||||||
/// All known alias of a same ingredient
|
/// All known alias of a same ingredient
|
||||||
alias: Vec<String>,
|
alias: Vec<String>,
|
||||||
@@ -33,7 +36,6 @@ pub struct Ingredient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Ingredient {
|
impl Ingredient {
|
||||||
|
|
||||||
/// Builds a brand new ingredient with given name as first alias
|
/// Builds a brand new ingredient with given name as first alias
|
||||||
pub(super) fn new(name: String) -> Ingredient {
|
pub(super) fn new(name: String) -> Ingredient {
|
||||||
Ingredient {
|
Ingredient {
|
||||||
|
|||||||
@@ -1,20 +1,4 @@
|
|||||||
//! Storage backend for persistent data
|
//! Storage backend for persistent data
|
||||||
//!
|
//!
|
||||||
use std::collections::HashMap;
|
//! Data is stored in a sqlite file.
|
||||||
|
//! We'll try to use Diesel-rs, but not ready yet to grasp it all.
|
||||||
/// 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(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user