From 2a53bf5db52745a61951ae0a951a94f7aa54c00d Mon Sep 17 00:00:00 2001 From: rrokkam Date: Sun, 19 Jul 2020 12:35:37 -0700 Subject: [PATCH] Delete imports that are already in the prelude `Vec` and `String` are in the prelude, so qualifying them with `vec::Vec` and `string::String` is unnecessary. --- rust/Cargo.lock | 4 +++- rust/src/gildedrose/mod.rs | 9 +++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 524f449a..54e4db43 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1,4 +1,6 @@ -[root] +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +[[package]] name = "rust" version = "0.1.0" diff --git a/rust/src/gildedrose/mod.rs b/rust/src/gildedrose/mod.rs index 17314625..0c1bc16c 100644 --- a/rust/src/gildedrose/mod.rs +++ b/rust/src/gildedrose/mod.rs @@ -1,8 +1,5 @@ -use std::string; -use std::vec; - pub struct Item { - pub name: string::String, + pub name: String, pub sell_in: i32, pub quality: i32, } @@ -18,11 +15,11 @@ impl Item { } pub struct GildedRose { - pub items: vec::Vec, + pub items: Vec, } impl GildedRose { - pub fn new(items: vec::Vec) -> GildedRose { + pub fn new(items: Vec) -> GildedRose { GildedRose { items: items } }