Skip to content

Commit

Permalink
Fix clippy::default_constructed_unit_structs lint warnings (#369)
Browse files Browse the repository at this point in the history
  • Loading branch information
TimJentzsch authored Jul 24, 2023
1 parent 8904e1e commit 76c3b0d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/action_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ impl<A: Actionlike> Default for ActionState<A> {
fn default() -> ActionState<A> {
ActionState {
action_data: A::variants().map(|_| ActionData::default()).collect(),
_phantom: PhantomData::default(),
_phantom: PhantomData,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/clashing_inputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ impl<A: Actionlike> Clash<A> {
index_b: action_b.index(),
inputs_a: Vec::default(),
inputs_b: Vec::default(),
_phantom: PhantomData::default(),
_phantom: PhantomData,
}
}

Expand All @@ -205,7 +205,7 @@ impl<A: Actionlike> Clash<A> {
index_b,
inputs_a: Vec::default(),
inputs_b: Vec::default(),
_phantom: PhantomData::default(),
_phantom: PhantomData,
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ impl<A: Actionlike> Default for ActionIter<A> {
fn default() -> Self {
ActionIter {
index: 0,
_phantom: PhantomData::default(),
_phantom: PhantomData,
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub struct InputManagerPlugin<A: Actionlike> {
impl<A: Actionlike> Default for InputManagerPlugin<A> {
fn default() -> Self {
Self {
_phantom: PhantomData::default(),
_phantom: PhantomData,
machine: Machine::Client,
}
}
Expand All @@ -67,7 +67,7 @@ impl<A: Actionlike> InputManagerPlugin<A> {
#[must_use]
pub fn server() -> Self {
Self {
_phantom: PhantomData::default(),
_phantom: PhantomData,
machine: Machine::Server,
}
}
Expand Down

0 comments on commit 76c3b0d

Please sign in to comment.