refactor: remove warnings
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
//! Yeah I know, that's kind of weird that it displays
|
||||
//! But it does.........
|
||||
|
||||
// TODO strum redefine in bevy_controls
|
||||
|
||||
use bevy::{ecs::schedule::States, prelude::*};
|
||||
use bevy_controls::{
|
||||
contract::InputsContainer,
|
||||
|
||||
@@ -2,14 +2,12 @@ extern crate proc_macro;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
use std::collections::HashMap;
|
||||
//use quote::quote;
|
||||
use quote::quote;
|
||||
use syn::{
|
||||
parse::{Parse, ParseStream, Result},
|
||||
parse_macro_input,
|
||||
punctuated::Punctuated,
|
||||
token::{Add, Bracket},
|
||||
Expr, Ident, ItemTrait, LitStr, Token, TypeParamBound,
|
||||
ItemTrait, LitStr, Token, TypeParamBound,
|
||||
};
|
||||
|
||||
// #[cfg_feature_trait_bounds {
|
||||
@@ -62,8 +60,8 @@ impl Parse for FeatureTraitBoundMap {
|
||||
|
||||
#[proc_macro_attribute]
|
||||
pub fn cfg_feature_trait_bounds(attr: TokenStream, input: TokenStream) -> TokenStream {
|
||||
let rules = parse_macro_input!(attr as FeatureTraitBoundMap);
|
||||
let input = parse_macro_input!(input as ItemTrait);
|
||||
let _rules = parse_macro_input!(attr as FeatureTraitBoundMap);
|
||||
let _input = parse_macro_input!(input as ItemTrait);
|
||||
|
||||
dbg!(std::env::vars().map(|(key, _)| key).collect::<Vec<_>>());
|
||||
|
||||
|
||||
@@ -2,5 +2,3 @@ pub mod contract;
|
||||
pub mod plugin;
|
||||
pub mod resource;
|
||||
mod util;
|
||||
|
||||
pub use util::*;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
use bevy_app::{App, Plugin, PreUpdate};
|
||||
use bevy_derive::{Deref, DerefMut};
|
||||
use bevy_ecs::schedule::IntoSystemConfigs;
|
||||
use bevy_ecs::system::{In, IntoSystem};
|
||||
use bevy_ecs::{
|
||||
event::EventReader,
|
||||
@@ -141,7 +140,7 @@ impl<A: Action, Ic: InputsContainer<A>, Gs: GameState> ControlsPlugin<A, Ic, Gs>
|
||||
|
||||
action_binding_pairs.sort_by(|a, b| b.2.input.len().cmp(&a.2.input.len()));
|
||||
|
||||
'bindings_loop: for (action, config, binding) in action_binding_pairs.iter() {
|
||||
'bindings_loop: for (action, _config, binding) in action_binding_pairs.iter() {
|
||||
// check binding conditions
|
||||
for condition in &binding.conditions {
|
||||
match condition {
|
||||
|
||||
@@ -123,7 +123,7 @@ impl<A: Action> PlayerActions<A> {
|
||||
self.current.get(&action).unwrap().to_boolean()
|
||||
&& !self.previous.get(&action).unwrap().to_boolean(),
|
||||
);
|
||||
Err("This input is not boolean".into())
|
||||
//Err("This input is not boolean".into())
|
||||
}
|
||||
|
||||
/// Set input value to new
|
||||
|
||||
Reference in New Issue
Block a user