From 1d0df7cdedbf9dbd578732b860e784095683e899 Mon Sep 17 00:00:00 2001 From: Ende Date: Mon, 26 Oct 2015 13:28:53 -0400 Subject: [PATCH] MOD: added @TODO note for more better handling of transformations in case of invalid input --- src/transformation/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/transformation/mod.rs b/src/transformation/mod.rs index 531f2c4..9f93e70 100644 --- a/src/transformation/mod.rs +++ b/src/transformation/mod.rs @@ -81,7 +81,10 @@ fn uppercase_first(base_word: &[u8]) -> Vec { [v, Vec::from(&base_word[i..])].concat() } - +/// @TODO transformation() SHOULD return a Result, for cases where a base_word is passed in +/// for example with length 3, and OmitFirst5 is called on it. +/// In such a case, an error should be returned, where right now, the Omit-length is +/// being clamped to the base_word-length. pub fn transformation(id: usize, base_word: &[u8]) -> Vec { match id { 0 => Vec::from(base_word),