Skip to content

Commit

Permalink
Fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
janhohenheim committed Jan 22, 2024
1 parent ffc3761 commit 6582479
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 11 deletions.
1 change: 0 additions & 1 deletion crates/bevy_plugin/src/commands/command_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ macro_rules! yarn_commands {
}

use crate::commands::command_registry::wait::Wait;
pub use yarn_commands;

#[cfg(test)]
mod tests {
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_plugin/src/localization/strings_file/asset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ fn combine_comments(full_old_comment: &str, new_metadata: &str) -> String {
let new_metadata = (!new_metadata.is_empty()).then_some(new_metadata);
[translator_comment, new_metadata]
.into_iter()
.filter_map(|s| s)
.flatten()
.collect::<Vec<_>>()
.join(LINE_METADATA_PREFIX_SEPARATOR)
}
Expand Down
3 changes: 0 additions & 3 deletions crates/bevy_plugin/tests/utils/assertion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ macro_rules! get_reader {
&mut $asserter.execute_command_reader
};
}
pub use get_reader;

#[macro_export]
macro_rules! assert_events {
Expand Down Expand Up @@ -95,5 +94,3 @@ macro_rules! assert_events {
)?
};
}

pub use assert_events;
1 change: 0 additions & 1 deletion crates/bevy_plugin/tests/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ mod assertion;

pub mod prelude {
pub use super::*;
pub use assertion::*;
}

pub trait AppExt {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub(crate) fn add_initial_value_registrations(
};
if let Some(ref mut program) = compilation.program {
let value = match &declaration.r#type {
Type::String => Operand::from(String::try_from(default_value).unwrap()),
Type::String => Operand::from(String::from(default_value)),
Type::Number => Operand::from(f32::try_from(default_value).unwrap()),
Type::Boolean => Operand::from(bool::try_from(default_value).unwrap()),
_ => panic!("Cannot create initial value registration for type {}. This is a bug. Please report it at https://github.com/yarn-slinger/yarn_slinger/issues/new", declaration.r#type.format()),
Expand Down
1 change: 0 additions & 1 deletion crates/compiler/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ mod add_tags_to_lines;
pub(crate) mod antlr_rust_ext;
pub(crate) mod run_compilation;
pub(crate) mod utils;
pub use add_tags_to_lines::*;

#[allow(missing_docs)]
pub type Result<T> = std::result::Result<T, CompilerError>;
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//! ## Implementation Notes
//! - `IBridgeableType` is not implemented because it is not actually used anywhere.
pub use {function::*, r#type::*, r#type::*, type_util::*};
pub use {function::*, r#type::*, type_util::*};

mod any;
mod boolean;
Expand Down
3 changes: 1 addition & 2 deletions crates/core/src/yarn_fn/function_registry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ mod tests {
true.into(),
1.0.into(),
]))
.try_into()
.unwrap();
.into();

assert!(result1);
assert_eq!(result2, 3.0);
Expand Down

0 comments on commit 6582479

Please sign in to comment.