From 39ba8400acf6e39a953df943d77eb96fdef3f38c Mon Sep 17 00:00:00 2001 From: Carlos Cobo Date: Thu, 5 Feb 2015 23:51:25 +0100 Subject: [PATCH] Remove unused imports, add missing Copy derives, add missing features. --- src/main.rs | 2 ++ src/minecraft/block_state.rs | 7 +++---- src/minecraft/nbt.rs | 1 - src/shader.rs | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8a12d83..107d510 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,8 @@ #![feature(box_syntax)] #![feature(plugin)] +#![feature(collections, core, io, os, path, rustc_private, std_misc)] + #[plugin] #[no_link] diff --git a/src/minecraft/block_state.rs b/src/minecraft/block_state.rs index 025065d..14915d3 100644 --- a/src/minecraft/block_state.rs +++ b/src/minecraft/block_state.rs @@ -9,7 +9,6 @@ use std::num::UnsignedInt; use array::*; use chunk::{BiomeId, BlockState, Chunk}; use cube; -use device::draw::CommandBuffer; use gfx::Device; use minecraft::biome::Biomes; use minecraft::data::BLOCK_STATES; @@ -28,14 +27,14 @@ pub struct BlockStates { texture: Texture } -#[derive(PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone, Copy)] pub enum RandomOffset { None, XZ, XYZ } -#[derive(PartialEq, Eq, Clone)] +#[derive(PartialEq, Eq, Clone, Copy)] pub enum Dir { Down, Up, @@ -69,7 +68,7 @@ impl Dir { } } -#[derive(Clone)] +#[derive(Clone, Copy)] pub enum PolymorphDecision { // Stop and use this block state ID for the model. PickBlockState(u16), diff --git a/src/minecraft/nbt.rs b/src/minecraft/nbt.rs index 5eed3a9..7f949a8 100644 --- a/src/minecraft/nbt.rs +++ b/src/minecraft/nbt.rs @@ -6,7 +6,6 @@ use std::string::ToString; use flate::{ inflate_bytes, inflate_bytes_zlib }; use serialize; -use serialize::Decodable; use serialize::hex::ToHex; use self::Nbt::*; diff --git a/src/shader.rs b/src/shader.rs index a0c644b..2f9672f 100644 --- a/src/shader.rs +++ b/src/shader.rs @@ -2,7 +2,6 @@ use device; use device::draw::CommandBuffer; use gfx; use gfx::{ Device, DeviceHelper, ToSlice }; -use gfx::render; use vecmath::Matrix4; static VERTEX: gfx::ShaderSource<'static> = shaders! {