Skip to content

Commit

Permalink
Fixed clippy issues?
Browse files Browse the repository at this point in the history
  • Loading branch information
StarArawn committed Feb 11, 2024
1 parent 24d09d3 commit ad104ec
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions examples/avsb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ struct CurrentCountBundle {
impl Default for CurrentCountBundle {
fn default() -> Self {
Self {
count: CurrentCount::default(),
count: CurrentCount,
styles: KStyle::default(),
computed_styles: ComputedStyles::default(),
widget_name: CurrentCount::default().get_name(),
widget_name: CurrentCount.get_name(),
}
}
}
Expand Down Expand Up @@ -187,7 +187,7 @@ fn startup(

widget_context.add_widget_data::<CurrentCount, CurrentCountState>();
widget_context.add_widget_system(
CurrentCount::default().get_name(),
CurrentCount.get_name(),
widget_update::<CurrentCount, CurrentCountState>,
current_count_render,
);
Expand Down
6 changes: 3 additions & 3 deletions examples/conditional_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ struct MyWidgetBundle {
impl Default for MyWidgetBundle {
fn default() -> Self {
Self {
count: MyWidget::default(),
count: MyWidget,
styles: KStyle::default(),
widget_name: MyWidget::default().get_name(),
widget_name: MyWidget.get_name(),
}
}
}
Expand Down Expand Up @@ -115,7 +115,7 @@ fn startup(
let parent_id = None;
widget_context.add_widget_data::<MyWidget, MyWidgetState>();
widget_context.add_widget_system(
MyWidget::default().get_name(),
MyWidget.get_name(),
widget_update::<MyWidget, MyWidgetState>,
my_widget_render,
);
Expand Down
6 changes: 3 additions & 3 deletions examples/modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ struct MyWidgetBundle {
impl Default for MyWidgetBundle {
fn default() -> Self {
Self {
count: MyWidget::default(),
count: MyWidget,
styles: KStyle::default(),
widget_name: MyWidget::default().get_name(),
widget_name: MyWidget.get_name(),
}
}
}
Expand Down Expand Up @@ -140,7 +140,7 @@ fn startup(
let parent_id = None;
widget_context.add_widget_data::<MyWidget, MyWidgetState>();
widget_context.add_widget_system(
MyWidget::default().get_name(),
MyWidget.get_name(),
widget_update::<MyWidget, MyWidgetState>,
my_widget_render,
);
Expand Down
2 changes: 1 addition & 1 deletion examples/quads.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ fn main() {
.add_plugins(DefaultPlugins)
.add_plugins((
LogDiagnosticsPlugin::default(),
FrameTimeDiagnosticsPlugin::default(),
FrameTimeDiagnosticsPlugin,
KayakContextPlugin,
KayakWidgets,
))
Expand Down
2 changes: 1 addition & 1 deletion examples/scrolling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fn main() {
KayakContextPlugin,
KayakWidgets,
LogDiagnosticsPlugin::default(),
FrameTimeDiagnosticsPlugin::default(),
FrameTimeDiagnosticsPlugin,
))
.add_systems(Startup, startup)
.run()
Expand Down
6 changes: 3 additions & 3 deletions examples/simple_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ struct CurrentCountBundle {
impl Default for CurrentCountBundle {
fn default() -> Self {
Self {
count: CurrentCount::default(),
count: CurrentCount,
styles: KStyle::default(),
computed_styles: ComputedStyles::default(),
widget_name: CurrentCount::default().get_name(),
widget_name: CurrentCount.get_name(),
}
}
}
Expand Down Expand Up @@ -98,7 +98,7 @@ fn startup(
let parent_id = None;
widget_context.add_widget_data::<CurrentCount, CurrentCountState>();
widget_context.add_widget_system(
CurrentCount::default().get_name(),
CurrentCount.get_name(),
widget_update::<CurrentCount, CurrentCountState>,
current_count_render,
);
Expand Down
4 changes: 2 additions & 2 deletions examples/text_box.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Default for TextBoxExampleBundle {
Self {
text_box_example: Default::default(),
styles: Default::default(),
widget_name: TextBoxExample::default().get_name(),
widget_name: TextBoxExample.get_name(),
}
}
}
Expand Down Expand Up @@ -100,7 +100,7 @@ fn startup(

widget_context.add_widget_data::<TextBoxExample, TextBoxExampleState>();
widget_context.add_widget_system(
TextBoxExample::default().get_name(),
TextBoxExample.get_name(),
widget_update::<TextBoxExample, TextBoxExampleState>,
update_text_box_example,
);
Expand Down
4 changes: 2 additions & 2 deletions examples/todo/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub struct TodoInputBundle {
impl Default for TodoInputBundle {
fn default() -> Self {
Self {
widget: TodoInputProps::default(),
widget: TodoInputProps,
focusable: Default::default(),
styles: KStyle::default(),
computed_styles: ComputedStyles(KStyle {
Expand All @@ -31,7 +31,7 @@ impl Default for TodoInputBundle {
bottom: StyleProp::Value(Units::Pixels(20.0)),
..KStyle::default()
}),
widget_name: TodoInputProps::default().get_name(),
widget_name: TodoInputProps.get_name(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/todo/items.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ pub struct TodoItemsBundle {
impl Default for TodoItemsBundle {
fn default() -> Self {
Self {
widget: TodoItemsProps::default(),
widget: TodoItemsProps,
styles: KStyle::default(),
computed_styles: ComputedStyles(KStyle {
render_command: StyleProp::Value(RenderCommand::Layout),
height: StyleProp::Value(Units::Auto),
width: StyleProp::Value(Units::Stretch(1.0)),
..KStyle::default()
}),
widget_name: TodoItemsProps::default().get_name(),
widget_name: TodoItemsProps.get_name(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions examples/todo/todo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ fn startup(
widget_context.add_widget_data::<TodoInputProps, EmptyState>();

widget_context.add_widget_system(
TodoItemsProps::default().get_name(),
TodoItemsProps.get_name(),
widget_update_with_resource::<TodoItemsProps, EmptyState>,
render_todo_items,
);
widget_context.add_widget_system(
TodoInputProps::default().get_name(),
TodoInputProps.get_name(),
widget_update_with_resource::<TodoInputProps, EmptyState>,
render_todo_input,
);
Expand Down
2 changes: 1 addition & 1 deletion examples/transitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ fn main() {
KayakContextPlugin,
KayakWidgets,
LogDiagnosticsPlugin::default(),
FrameTimeDiagnosticsPlugin::default(),
FrameTimeDiagnosticsPlugin,
))
.add_systems(Startup, startup)
.run()
Expand Down
2 changes: 1 addition & 1 deletion examples/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn my_widget_1_update(
) -> bool {
if query.get(entity).is_ok() {
let parent_id = Some(entity);
let data = vec![
let data = [
"Text 1", "Text 2", "Text 3", "Text 4", "Text 5", "Text 6", "Text 7", "Text 8",
"Text 9", "Text 10",
];
Expand Down

0 comments on commit ad104ec

Please sign in to comment.