Skip to content

Commit

Permalink
chore(rust-toolchain): bump rust to 1.83 (#502)
Browse files Browse the repository at this point in the history
* chore(rust-toolchain): bump rust to 1.83

https://github.com/rust-lang/rust/releases/tag/1.83.0

* fix(src): cargo clippy autofix

warning: the following explicit lifetimes could be elided: 'a
https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
  • Loading branch information
andros21 authored Dec 1, 2024
1 parent 607ef57 commit f6b0264
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[toolchain]
channel = "1.82"
channel = "1.83"
components = ["clippy", "rustfmt", "rust-docs"]
profile = "minimal"
8 changes: 3 additions & 5 deletions src/hdrimage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -327,11 +327,9 @@ impl HdrImage {
.save_with_format(&path, format)
.map_err(HdrImageErr::LdrFileWriteFailure)
},
_ => {
return Err(HdrImageErr::UnsupportedLdrFileFormat(String::from(
path.extension().unwrap().to_str().unwrap_or(""),
)))
},
_ => Err(HdrImageErr::UnsupportedLdrFileFormat(String::from(
path.extension().unwrap().to_str().unwrap_or(""),
))),
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct FlatRenderer<'a> {
bg_color: Color,
}

impl<'a> Solve for OnOffRenderer<'a> {
impl Solve for OnOffRenderer<'_> {
/// Solve rendering with on/off strategy.
///
/// If intersection happens return `fg_color` otherwise `bg_color`.
Expand All @@ -73,7 +73,7 @@ impl<'a> FlatRenderer<'a> {
}
}

impl<'a> Solve for FlatRenderer<'a> {
impl Solve for FlatRenderer<'_> {
/// Solve rendering with flat colors.
///
/// If intersection happens return the color of the hit shape, otherwise `bg_color`.
Expand Down Expand Up @@ -126,7 +126,7 @@ impl<'a> PathTracer<'a> {
}
}

impl<'a> Solve for PathTracer<'a> {
impl Solve for PathTracer<'_> {
/// Solve the rendering equation using a path tracing algorithm.
///
/// The algorithm implemented here allows the caller to tune number of\
Expand Down Expand Up @@ -192,7 +192,7 @@ pub enum Renderer<'a> {
Flat(FlatRenderer<'a>),
}

impl<'a> Solve for Renderer<'a> {
impl Solve for Renderer<'_> {
/// Render the scene using a particular [`Renderer`] variants.
fn solve(&self, ray: Ray, pcg: &mut Pcg) -> Color {
match self {
Expand Down

0 comments on commit f6b0264

Please sign in to comment.