From d4acfb1a382390b63b466f984751da4cb95e6c56 Mon Sep 17 00:00:00 2001 From: Alexey Dubovskoy Date: Wed, 11 Dec 2024 07:57:17 +0000 Subject: [PATCH] docs: shopping list clarification --- bindings/README.md | 1 + bindings/src/model.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/bindings/README.md b/bindings/README.md index 5dca504..8070904 100644 --- a/bindings/README.md +++ b/bindings/README.md @@ -40,6 +40,7 @@ This library exports methods: // combines ingredient lists into one // usage example: // let all_recipe_ingredients_combined = combine_ingredients(recipe.ingredients); + // if multiple recipes need to be combined, combine their ingredients lists and pass them to this method combine_ingredients(ingredients: Vec) -> IngredientList; // combines ingredient lists into one // usage example: diff --git a/bindings/src/model.rs b/bindings/src/model.rs index a80946c..3ab98d5 100644 --- a/bindings/src/model.rs +++ b/bindings/src/model.rs @@ -411,6 +411,7 @@ pub(crate) fn into_simple_recipe(recipe: &OriginalRecipe) -> CooklangRecipe { } // Process metadata + // TODO: add support for nested metadata for (key, value) in &recipe.metadata.map { if let (Some(key), Some(value)) = (key.as_str(), value.as_str()) { metadata.insert(key.to_string(), value.to_string());