100-exercises-to-learn-rust icon indicating copy to clipboard operation
100-exercises-to-learn-rust copied to clipboard

Suggestion for 03 Ticket - 02 Validation

Open chiroptical opened this issue 1 year ago • 0 comments

Two notes

  • Requiring specific panic messages for the errors is a little annoying
  • Technically this is wrong Title cannot be longer than 50 characters , from https://doc.rust-lang.org/std/string/struct.String.html#method.len
Returns the length of this String, in bytes, not chars or graphemes. In other words, it might not be what a human considers the length of the string.

In the exercise it asks the 'title' should be at most 50 bytes long

chiroptical avatar May 17 '24 20:05 chiroptical