You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// So far we have allowed any string as a valid title and description.
/// That's not what would happen in JIRA: we wouldn't allow tickets with an empty title,
/// for example.
/// Both title and description would also have length limitations: the Divine Comedy probably
/// shouldn't be allowed as a ticket description.
///
/// We want to define a function that takes in a title, a description and a status and
/// performs validation: it panics if validation fails, it returns a `Ticket` if validation
/// succeeds.
///
/// We will learn a better way to handle recoverable errors such as this one further along,
/// but let's rely on panic for the time being.
fn create_ticket(title: String, description: String, status: Status) -> Ticket {
todo!()
}
````
What am I suppose to do ?
and how do I know what a valid title and description is ?
The text was updated successfully, but these errors were encountered:
If you look at the end or bottom part of the source file, you will find what a valid title or description is.
You will have to replace the todo!() function with if statements that panic! when the title/description is invalid.
More information on panics: https://doc.rust-lang.org/book/ch09-03-to-panic-or-not-to-panic.html
hello,
Im now looking at this part
The text was updated successfully, but these errors were encountered: