mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-13 17:49:25 +00:00
Use 2018-edition field init shorthand
This commit is contained in:
1 parent
972e00541a
commit
b9372efe6f
1 file changed
+4
-4
@@ -7,9 +7,9 @@ pub struct Item {
|
||||
impl Item {
|
||||
pub fn new(name: String, sell_in: i32, quality: i32) -> Item {
|
||||
Item {
|
||||
name: name,
|
||||
sell_in: sell_in,
|
||||
quality: quality,
|
||||
name,
|
||||
sell_in,
|
||||
quality,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ pub struct GildedRose {
|
||||
|
||||
impl GildedRose {
|
||||
pub fn new(items: Vec<Item>) -> GildedRose {
|
||||
GildedRose { items: items }
|
||||
GildedRose { items }
|
||||
}
|
||||
|
||||
pub fn update_quality(&mut self) {
|
||||
|
||||
Reference in new issue
Block a user