Skip to content

Commit

Permalink
apply clippy fixes
Browse files Browse the repository at this point in the history
Signed-off-by: David Cohen <dacohen@pm.me>
  • Loading branch information
osimarr committed Mar 14, 2024
1 parent 1208224 commit e0b3b57
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
18 changes: 8 additions & 10 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,14 @@ fn main() {
error
);
}
} else {
if let Err(error) = window
.subsystem()
.gl_set_swap_interval(SwapInterval::Immediate)
{
println!(
"Failed to gl_set_swap_interval(SwapInterval::Immediate): {}",
error
);
}
} else if let Err(error) = window
.subsystem()
.gl_set_swap_interval(SwapInterval::Immediate)
{
println!(
"Failed to gl_set_swap_interval(SwapInterval::Immediate): {}",
error
);
}

let start_time = Instant::now();
Expand Down
4 changes: 2 additions & 2 deletions examples/mix/triangle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ use std::mem;
use std::ptr;
use std::str;

const VS_SRC: &'static str = "
const VS_SRC: &str = "
#version 150
in vec2 position;
void main() {
gl_Position = vec4(position, 0.0, 1.0);
}";

const FS_SRC: &'static str = "
const FS_SRC: &str = "
#version 150
out vec4 out_color;
Expand Down
2 changes: 1 addition & 1 deletion src/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ impl Painter {

fn generate_gl_texture2d(
gl_id: &mut Option<GLuint>,
pixels: &Vec<u8>,
pixels: &[u8],
width: i32,
height: i32,
filtering: bool,
Expand Down

0 comments on commit e0b3b57

Please sign in to comment.