clean warnings from voxygen/hud

This commit is contained in:
Songtronix 2019-07-02 21:25:07 +00:00 committed by Joshua Barretto
parent eecea846a9
commit 0c3d693561
8 changed files with 19 additions and 32 deletions

View File

@ -219,8 +219,7 @@ impl WriteVol for Chonk {
*/
SubChunk::Heterogeneous(chunk) => {
chunk.set(rpos, block).map_err(ChonkError::ChunkError)
}
//_ => unimplemented!(),
} //_ => unimplemented!(),
}
}
}

View File

@ -23,18 +23,17 @@ pub struct Bag<'a> {
inventory_space: u32,
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
#[conrod(common_builder)]
common: widget::CommonBuilder,
}
impl<'a> Bag<'a> {
pub fn new(inventory_space: u32, imgs: &'a Imgs, fonts: &'a Fonts) -> Self {
pub fn new(inventory_space: u32, imgs: &'a Imgs, _fonts: &'a Fonts) -> Self {
Self {
inventory_space,
imgs,
fonts,
_fonts,
common: widget::CommonBuilder::default(),
}
}

View File

@ -31,8 +31,7 @@ pub struct Buttons<'a> {
show_bag: bool,
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
#[conrod(common_builder)]
common: widget::CommonBuilder,
}
@ -43,14 +42,14 @@ impl<'a> Buttons<'a> {
show_map: bool,
show_bag: bool,
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
) -> Self {
Self {
open_windows,
show_map,
show_bag,
imgs,
fonts,
_fonts,
common: widget::CommonBuilder::default(),
}
}

View File

@ -21,17 +21,16 @@ widget_ids! {
#[derive(WidgetCommon)]
pub struct EscMenu<'a> {
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
#[conrod(common_builder)]
common: widget::CommonBuilder,
}
impl<'a> EscMenu<'a> {
pub fn new(imgs: &'a Imgs, fonts: &'a Fonts) -> Self {
pub fn new(imgs: &'a Imgs, _fonts: &'a Fonts) -> Self {
Self {
imgs,
fonts,
_fonts,
common: widget::CommonBuilder::default(),
}
}

View File

@ -7,8 +7,6 @@ use conrod_core::{
use super::{img_ids::Imgs, Fonts, Show, TEXT_COLOR_2};
use client::{self, Client};
use std::{cell::RefCell, rc::Rc};
widget_ids! {
struct Ids {
map_frame,
@ -26,23 +24,21 @@ widget_ids! {
#[derive(WidgetCommon)]
pub struct Map<'a> {
show: &'a Show,
_show: &'a Show,
client: &'a Client,
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
#[conrod(common_builder)]
common: widget::CommonBuilder,
}
impl<'a> Map<'a> {
pub fn new(show: &'a Show, client: &'a Client, imgs: &'a Imgs, fonts: &'a Fonts) -> Self {
Self {
show,
_show: show,
imgs,
client,
fonts,
_fonts: fonts,
common: widget::CommonBuilder::default(),
}
}

View File

@ -7,8 +7,6 @@ use conrod_core::{
use super::{img_ids::Imgs, Fonts, Show, TEXT_COLOR};
use client::{self, Client};
use std::{cell::RefCell, rc::Rc};
widget_ids! {
struct Ids {
mmap_frame,
@ -25,8 +23,7 @@ pub struct MiniMap<'a> {
client: &'a Client,
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
#[conrod(common_builder)]
common: widget::CommonBuilder,
}
@ -37,7 +34,7 @@ impl<'a> MiniMap<'a> {
show,
client,
imgs,
fonts,
_fonts: fonts,
common: widget::CommonBuilder::default(),
}
}

View File

@ -38,7 +38,6 @@ use conrod_core::{
};
use specs::Join;
use std::collections::VecDeque;
use std::{cell::RefCell, rc::Rc};
use vek::*;
const XP_COLOR: Color = Color::Rgba(0.59, 0.41, 0.67, 1.0);
@ -367,7 +366,7 @@ impl Hud {
}
// Render Health Bars
for (entity, pos, stats) in (&entities, &pos, &stats)
for (_entity, pos, stats) in (&entities, &pos, &stats)
.join()
.filter(|(entity, _, stats)| {
*entity != me

View File

@ -29,8 +29,7 @@ widget_ids! {
#[derive(WidgetCommon)]
pub struct Skillbar<'a> {
imgs: &'a Imgs,
fonts: &'a Fonts,
_fonts: &'a Fonts,
stats: &'a Stats,
#[conrod(common_builder)]
@ -41,7 +40,7 @@ impl<'a> Skillbar<'a> {
pub fn new(imgs: &'a Imgs, fonts: &'a Fonts, stats: &'a Stats) -> Self {
Self {
imgs,
fonts,
_fonts: fonts,
stats,
common: widget::CommonBuilder::default(),
}