Skip to content

Commit

Permalink
MOD: added @todo note for more better handling of transformations in …
Browse files Browse the repository at this point in the history
…case of invalid input
  • Loading branch information
ende76 committed Oct 26, 2015
1 parent 096b366 commit 1d0df7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/transformation/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ fn uppercase_first(base_word: &[u8]) -> Vec<u8> {
[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<u8> {
match id {
0 => Vec::from(base_word),
Expand Down

0 comments on commit 1d0df7c

Please sign in to comment.