Skip to content

Commit

Permalink
style: new clippy rules
Browse files Browse the repository at this point in the history
  • Loading branch information
francisdb committed Dec 5, 2024
1 parent 3fcdf22 commit 23e6d18
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 17 deletions.
5 changes: 3 additions & 2 deletions src/vpx/expanded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1688,10 +1688,11 @@ mod test {
assert_eq!(2, read_compressed_data.width);
assert_eq!(2, read_compressed_data.height);

Ok(assert_eq!(
assert_eq!(
LZW_COMPRESSED_DATA,
*read_compressed_data.lzw_compressed_data
))
);
Ok(())
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions src/vpx/gamedata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl<'de> Deserialize<'de> for ViewLayoutMode {
{
struct ViewLayoutModeVisitor;

impl<'de> serde::de::Visitor<'de> for ViewLayoutModeVisitor {
impl serde::de::Visitor<'_> for ViewLayoutModeVisitor {
type Value = ViewLayoutMode;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down Expand Up @@ -227,7 +227,7 @@ impl<'de> Deserialize<'de> for ToneMapper {
{
struct ToneMapperVisitor;

impl<'de> serde::de::Visitor<'de> for ToneMapperVisitor {
impl serde::de::Visitor<'_> for ToneMapperVisitor {
type Value = ToneMapper;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/hittarget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<'de> Deserialize<'de> for TargetType {
{
struct TargetTypeVisitor;

impl<'de> serde::de::Visitor<'de> for TargetTypeVisitor {
impl serde::de::Visitor<'_> for TargetTypeVisitor {
type Value = TargetType;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/kicker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<'de> Deserialize<'de> for KickerType {
{
struct KickerTypeVisitor;

impl<'de> serde::de::Visitor<'de> for KickerTypeVisitor {
impl serde::de::Visitor<'_> for KickerTypeVisitor {
type Value = KickerType;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
4 changes: 2 additions & 2 deletions src/vpx/gameitem/light.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl<'de> Deserialize<'de> for ShadowMode {
{
struct ShadowModeVisitor;

impl<'de> serde::de::Visitor<'de> for ShadowModeVisitor {
impl serde::de::Visitor<'_> for ShadowModeVisitor {
type Value = ShadowMode;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down Expand Up @@ -148,7 +148,7 @@ impl<'de> Deserialize<'de> for Fader {
{
struct FaderVisitor;

impl<'de> serde::de::Visitor<'de> for FaderVisitor {
impl serde::de::Visitor<'_> for FaderVisitor {
type Value = Fader;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/plunger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'de> Deserialize<'de> for PlungerType {
{
struct PlungerTypeVisitor;

impl<'de> serde::de::Visitor<'de> for PlungerTypeVisitor {
impl serde::de::Visitor<'_> for PlungerTypeVisitor {
type Value = PlungerType;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/ramp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<'de> Deserialize<'de> for RampType {
{
struct RampTypeVisitor;

impl<'de> serde::de::Visitor<'de> for RampTypeVisitor {
impl serde::de::Visitor<'_> for RampTypeVisitor {
type Value = RampType;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/ramp_image_alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl<'de> Deserialize<'de> for RampImageAlignment {
{
struct RampImageAlignmentVisitor;

impl<'de> serde::de::Visitor<'de> for RampImageAlignmentVisitor {
impl serde::de::Visitor<'_> for RampImageAlignmentVisitor {
type Value = RampImageAlignment;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/textbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<'de> Deserialize<'de> for TextAlignment {
{
struct TextAlignmentVisitor;

impl<'de> serde::de::Visitor<'de> for TextAlignmentVisitor {
impl serde::de::Visitor<'_> for TextAlignmentVisitor {
type Value = TextAlignment;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/gameitem/trigger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl<'de> Deserialize<'de> for TriggerShape {
{
struct TriggerShapeVisitor;

impl<'de> serde::de::Visitor<'de> for TriggerShapeVisitor {
impl serde::de::Visitor<'_> for TriggerShapeVisitor {
type Value = TriggerShape;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion src/vpx/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl<'de> Deserialize<'de> for MaterialType {
{
struct MaterialTypeVisitor;

impl<'de> serde::de::Visitor<'de> for MaterialTypeVisitor {
impl serde::de::Visitor<'_> for MaterialTypeVisitor {
type Value = MaterialType;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down
3 changes: 2 additions & 1 deletion src/vpx/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1083,7 +1083,8 @@ mod tests {

let read = read_gamedata(&mut comp2, &version)?;

Ok(assert_eq!(original, read))
assert_eq!(original, read);
Ok(())
}

#[test]
Expand Down
4 changes: 2 additions & 2 deletions src/vpx/renderprobe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl<'de> Deserialize<'de> for RenderProbeType {
D: serde::de::Deserializer<'de>,
{
struct RenderProbeTypeVisitor;
impl<'de> serde::de::Visitor<'de> for RenderProbeTypeVisitor {
impl serde::de::Visitor<'_> for RenderProbeTypeVisitor {
type Value = RenderProbeType;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down Expand Up @@ -163,7 +163,7 @@ impl<'de> Deserialize<'de> for ReflectionMode {
D: serde::de::Deserializer<'de>,
{
struct ReflectionModeVisitor;
impl<'de> serde::de::Visitor<'de> for ReflectionModeVisitor {
impl serde::de::Visitor<'_> for ReflectionModeVisitor {
type Value = ReflectionMode;

fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result {
Expand Down

0 comments on commit 23e6d18

Please sign in to comment.