Skip to content

Commit

Permalink
refactor(performance_matrix): rename setup and update functions for c…
Browse files Browse the repository at this point in the history
…larity

Rename `setup_performance_matrix` and `update_performance_matrix` functions to
simply `setup` and `update` to improve code readability and maintainability.
  • Loading branch information
ShenMian committed Jul 25, 2024
1 parent b0c1d8d commit d503885
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/plugins/performance_matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub struct PerformanceMatrixPlugin;
impl Plugin for PerformanceMatrixPlugin {
fn build(&self, app: &mut App) {
app.add_plugins(FrameTimeDiagnosticsPlugin)
.add_systems(Startup, setup_performance_matrix)
.add_systems(Update, update_performance_matrix);
.add_systems(Startup, setup)
.add_systems(Update, update);
}
}

Expand Down Expand Up @@ -56,11 +56,11 @@ impl PerformanceBundle {
}
}

fn setup_performance_matrix(mut commands: Commands) {
fn setup(mut commands: Commands) {
commands.spawn(PerformanceBundle::new());
}

fn update_performance_matrix(
fn update(
diagnostics: Res<DiagnosticsStore>,
mut query: Query<&mut Text, With<PerformanceCounter>>,
) {
Expand Down

0 comments on commit d503885

Please sign in to comment.