Use "bytes" instead of "characters" consistently when talking about length of a String.
This commit is contained in:
@@ -20,13 +20,13 @@ impl Ticket {
|
||||
panic!("Title cannot be empty");
|
||||
}
|
||||
if title.len() > 50 {
|
||||
panic!("Title cannot be longer than 50 characters");
|
||||
panic!("Title cannot be longer than 50 bytes");
|
||||
}
|
||||
if description.is_empty() {
|
||||
panic!("Description cannot be empty");
|
||||
}
|
||||
if description.len() > 500 {
|
||||
panic!("Description cannot be longer than 500 characters");
|
||||
panic!("Description cannot be longer than 500 bytes");
|
||||
}
|
||||
|
||||
Ticket {
|
||||
|
||||
Reference in New Issue
Block a user