Skip to content

Commit

Permalink
Give a name to unused parameters on trait declarations.
Browse files Browse the repository at this point in the history
Fix #16.
  • Loading branch information
sebcrozet committed Mar 7, 2014
1 parent f381891 commit 2e0900e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@ bin/custom_mesh_shared
bin/stereo
bin/text
bin/relativity
bin/custom_material
6 changes: 3 additions & 3 deletions src/camera/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub trait Camera {
* Event handling.
*/
/// Handle a mouse event.
fn handle_event(&mut self, &glfw::Window, &glfw::WindowEvent);
fn handle_event(&mut self, _window: &glfw::Window, _event: &glfw::WindowEvent);

/*
* Transformation-related methods.
Expand Down Expand Up @@ -44,8 +44,8 @@ pub trait Camera {
fn num_passes(&self) -> uint { 1u }

/// Indicates that a pass will begin.
fn start_pass(&self, uint, &glfw::Window) { }
fn start_pass(&self, _pass: uint, _window: &glfw::Window) { }

/// Indicates that the scene has been rendered and the post-processing is being run.
fn render_complete(&self, &glfw::Window) { }
fn render_complete(&self, _window: &glfw::Window) { }
}
1 change: 1 addition & 0 deletions src/object.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Data structure of a scene node.
use std::any::Any;
use std::cell::RefCell;
use std::rc::Rc;
use gl::types::*;
Expand Down
4 changes: 2 additions & 2 deletions src/resource/gl_primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ mod error;
/// Trait implemented by structures that can be uploaded to a uniform or contained by a gpu array.
pub trait GLPrimitive: Pod {
/// The opengl primitive type of this structure content.
fn gl_type(Option<Self>) -> GLuint;
fn gl_type(_type: Option<Self>) -> GLuint;
/// The number of elements of type `self.gl_type()` this structure stores.
fn size(Option<Self>) -> GLuint;
fn size(_type: Option<Self>) -> GLuint;
/// Uploads the element to a gpu location.
fn upload(&self, location: GLuint);
}
Expand Down

0 comments on commit 2e0900e

Please sign in to comment.