We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent afbb531 commit 21cb6aeCopy full SHA for 21cb6ae
exercises/03_ticket_v1/00_intro/src/lib.rs
@@ -1,6 +1,6 @@
1
fn intro() -> &'static str {
2
// TODO: fix me 👇
3
- "I'm ready to __!"
+ "I'm ready to start modelling a software ticket!"
4
}
5
6
#[cfg(test)]
exercises/03_ticket_v1/01_struct/src/lib.rs
@@ -5,6 +5,17 @@
// It should also have a method named `is_available` that returns a `true` if the quantity is
// greater than 0, otherwise `false`.
7
8
+struct Order {
9
+ price: u32,
10
+ quantity: u32,
11
+}
12
+
13
+impl Order {
14
+ fn is_available(self) -> bool {
15
+ self.quantity > 0
16
+ }
17
18
19
20
mod tests {
21
use super::*;
0 commit comments