diff --git a/backends/conrod_gfx/src/lib.rs b/backends/conrod_gfx/src/lib.rs index ba5e8944e..fa8a959ee 100644 --- a/backends/conrod_gfx/src/lib.rs +++ b/backends/conrod_gfx/src/lib.rs @@ -815,14 +815,6 @@ impl From> for RendererCreationError { } } -impl std::error::Error for RendererCreationError { - fn description(&self) -> &str { - match *self { - RendererCreationError::PipelineState(ref e) => std::error::Error::description(e), - } - } -} - impl std::fmt::Display for RendererCreationError { fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { match *self { diff --git a/backends/conrod_glium/examples/graph.rs b/backends/conrod_glium/examples/graph.rs index 5a170b1e2..12abc312c 100644 --- a/backends/conrod_glium/examples/graph.rs +++ b/backends/conrod_glium/examples/graph.rs @@ -184,16 +184,16 @@ fn set_widgets(ui: &mut conrod_core::UiCell, ids: &Ids, graph: &mut MyGraph, lay Event::Node(event) => match event { // NodeEvent::Add(node_kind) => { // }, - NodeEvent::Remove(node_id) => {} + NodeEvent::Remove(_node_id) => {} NodeEvent::Dragged { node_id, to, .. } => { *layout.get_mut(&node_id).unwrap() = to; } }, Event::Edge(event) => match event { - EdgeEvent::AddStart(node_socket) => {} - EdgeEvent::Add { start, end } => {} - EdgeEvent::Cancelled(node_socket) => {} - EdgeEvent::Remove { start, end } => {} + EdgeEvent::AddStart(_node_socket) => {} + EdgeEvent::Add { start: _, end: _ } => {} + EdgeEvent::Cancelled(_node_socket) => {} + EdgeEvent::Remove { start: _, end: _ } => {} }, } } diff --git a/backends/conrod_glium/src/lib.rs b/backends/conrod_glium/src/lib.rs index fee4ee462..12974ea2b 100644 --- a/backends/conrod_glium/src/lib.rs +++ b/backends/conrod_glium/src/lib.rs @@ -1020,15 +1020,6 @@ impl From for RendererCreationError } } -impl std::error::Error for RendererCreationError { - fn description(&self) -> &str { - match *self { - RendererCreationError::Texture(ref e) => std::error::Error::description(e), - RendererCreationError::Program(ref e) => std::error::Error::description(e), - } - } -} - impl std::fmt::Display for RendererCreationError { fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { match *self { @@ -1050,15 +1041,6 @@ impl From for DrawError { } } -impl std::error::Error for DrawError { - fn description(&self) -> &str { - match *self { - DrawError::Buffer(ref e) => std::error::Error::description(e), - DrawError::Draw(ref e) => std::error::Error::description(e), - } - } -} - impl std::fmt::Display for DrawError { fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> { match *self { diff --git a/conrod_core/src/position/mod.rs b/conrod_core/src/position/mod.rs index f9fee1d9c..bfaa65b00 100644 --- a/conrod_core/src/position/mod.rs +++ b/conrod_core/src/position/mod.rs @@ -145,10 +145,10 @@ pub enum Dimension { /// Thus, **Positionable** can be implemented for *all* types that implement **Widget**. pub trait Positionable: Sized { /// Build with the given **Position** along the *x* axis. - fn x_position(self, Position) -> Self; + fn x_position(self, _: Position) -> Self; /// Build with the given **Position** along the *y* axis. - fn y_position(self, Position) -> Self; + fn y_position(self, _: Position) -> Self; /// Get the **Position** along the *x* axis. fn get_x_position(&self, ui: &Ui) -> Position; diff --git a/conrod_core/src/widget/list.rs b/conrod_core/src/widget/list.rs index 595278195..378f80468 100644 --- a/conrod_core/src/widget/list.rs +++ b/conrod_core/src/widget/list.rs @@ -61,10 +61,10 @@ pub trait Direction { type Axis: widget::scrollbar::Axis; /// For some given `Rect`, returns the parallel and perpendicular ranges respectively. - fn ranges(Rect) -> (Range, Range); + fn ranges(_: Rect) -> (Range, Range); /// Begin building the scrollbar for the `List`. - fn scrollbar(widget::Id) -> widget::Scrollbar; + fn scrollbar(_: widget::Id) -> widget::Scrollbar; /// Borrow the scroll state associated with this `Direction`'s axis. fn common_scroll(common: &widget::CommonBuilder) -> Option<&widget::scroll::Scroll>; @@ -105,8 +105,8 @@ pub trait Direction { pub trait ItemSize: Sized + Clone + Copy { /// Update the `List` widget. fn update_list( - List, - widget::UpdateArgs>, + _: List, + _: widget::UpdateArgs>, ) -> as Widget>::Event where D: Direction; diff --git a/conrod_core/src/widget/list_select.rs b/conrod_core/src/widget/list_select.rs index 87516b2ed..1455cb039 100644 --- a/conrod_core/src/widget/list_select.rs +++ b/conrod_core/src/widget/list_select.rs @@ -48,24 +48,24 @@ pub trait Mode { /// Update the `PendingEvents` in accordance with the given `Click` event. fn click_selection( &self, - event::Click, + _: event::Click, i: usize, num_items: usize, - &State, + _: &State, is_selected: F, - &mut PendingEvents, + _: &mut PendingEvents, ) where F: Fn(usize) -> bool; /// Update the `PendingEvents` in accordance with the given `KeyPress` event. fn key_selection( &self, - event::KeyPress, + _: event::KeyPress, i: usize, num_items: usize, - &State, + _: &State, is_selected: F, - &mut PendingEvents, + _: &mut PendingEvents, ) where F: Fn(usize) -> bool, D: Direction; diff --git a/conrod_core/src/widget/mod.rs b/conrod_core/src/widget/mod.rs index f04e75260..6b14fa583 100644 --- a/conrod_core/src/widget/mod.rs +++ b/conrod_core/src/widget/mod.rs @@ -606,7 +606,7 @@ pub trait Widget: Common + Sized { /// /// The `Ui` will only call this once, immediately prior to the first time that /// **Widget::update** is first called. - fn init_state(&self, id::Generator) -> Self::State; + fn init_state(&self, _: id::Generator) -> Self::State; /// Return the styling of the widget. /// diff --git a/conrod_core/src/widget/primitive/shape/triangles.rs b/conrod_core/src/widget/primitive/shape/triangles.rs index d16e01510..38184883c 100644 --- a/conrod_core/src/widget/primitive/shape/triangles.rs +++ b/conrod_core/src/widget/primitive/shape/triangles.rs @@ -26,7 +26,7 @@ pub trait Vertex: Clone + Copy + PartialEq { /// The x y location of the vertex. fn point(&self) -> Point; /// Add the given vector onto the position of self and return the result. - fn add(self, Point) -> Self; + fn add(self, _: Point) -> Self; } /// Unique styling types for `Triangles`. diff --git a/conrod_core/src/widget/scroll.rs b/conrod_core/src/widget/scroll.rs index 8a622bb9d..95ca71c16 100644 --- a/conrod_core/src/widget/scroll.rs +++ b/conrod_core/src/widget/scroll.rs @@ -36,11 +36,11 @@ pub struct State { /// Methods for distinguishing behaviour between both scroll axes at compile-time. pub trait Axis { /// The range of the given `Rect` that is parallel with this `Axis`. - fn parallel_range(Rect) -> Range; + fn parallel_range(_: Rect) -> Range; /// The range of the given `Rect` that is perpendicular with this `Axis`. - fn perpendicular_range(Rect) -> Range; + fn perpendicular_range(_: Rect) -> Range; /// Given some rectangular `Padding`, return the `Range` that corresponds with this `Axis`. - fn padding_range(Padding) -> Range; + fn padding_range(_: Padding) -> Range; /// The coordinate of the given mouse position that corresponds with this `Axis`. fn mouse_scalar(mouse_xy: Point) -> Scalar; /// A `Scalar` multiplier representing the direction in which positive offset shifts the