Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix clippy and formatting #56

Merged
merged 2 commits into from
Sep 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions bevy_proto_backend/src/impls/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ macro_rules! from {

impl From<Input> for $real {
fn from(value: Input) -> Self {
#[allow(clippy::redundant_closure_call)]
$body(value)
}
}
Expand All @@ -49,6 +50,7 @@ macro_rules! from_to {

impl From<Input> for $mock {
fn from(value: Input) -> Self {
#[allow(clippy::redundant_closure_call)]
$body(value)
}
}
Expand All @@ -59,6 +61,7 @@ macro_rules! from_to {

impl From<Input> for $real {
fn from(value: Input) -> Self {
#[allow(clippy::redundant_closure_call)]
$body(value)
}
}
Expand All @@ -78,6 +81,7 @@ macro_rules! from_to_input {
input: Input,
context: &mut $crate::schematics::SchematicContext,
) -> Self {
#[allow(clippy::redundant_closure_call)]
$body(input, context)
}
}
Expand All @@ -91,6 +95,7 @@ macro_rules! from_to_input {
input: Input,
context: &mut $crate::schematics::SchematicContext,
) -> Self {
#[allow(clippy::redundant_closure_call)]
$body(input, context)
}
}
Expand Down
4 changes: 3 additions & 1 deletion bevy_proto_derive/src/schematic/field_attributes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ impl<'a> FieldAttributesBuilder<'a> {
ReplacementType::Asset(AssetConfig::default()),
meta.path.span(),
)?;
let ReplacementType::Asset(config) = &mut self.attrs.replacement_ty else {unreachable!()};
let ReplacementType::Asset(config) = &mut self.attrs.replacement_ty else {
unreachable!()
};
config
};

Expand Down