Skip to content

devtools: Standardize variable naming for TargetConfigurationActor#43937

Closed
thebabalola wants to merge 1 commit into
servo:mainfrom
thebabalola:devtools/rename-target-configuration-actor
Closed

devtools: Standardize variable naming for TargetConfigurationActor#43937
thebabalola wants to merge 1 commit into
servo:mainfrom
thebabalola:devtools/rename-target-configuration-actor

Conversation

@thebabalola

@thebabalola thebabalola commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

Renames the target_configuration field and local variable in watcher.rs to use the _name and _actor suffixes, following the convention already used by other actors in the file (thread_actor, tab_name, etc.).

  • target_configuration: String field → target_configuration_name: String
  • let target_configuration = ... local → let target_configuration_actor = ...
  • Updated all references accordingly (.name() call, registry insertion, struct literal)

Part of #43606.

  • There are tests for these changes OR
  • These changes do not require tests ??

The variable names for the `TargetConfigurationActor` in `watcher.rs`
did not follow the naming convention used elsewhere in the devtools
crate, where variables holding an actor struct should end in `_actor`
and variables holding an actor name string should end in `_name`.

The `target_configuration` field on `WatcherActor` holds a name string,
so it has been renamed to `target_configuration_name`. The local
variable in `WatcherActor::new` holds the actor struct itself, so it
has been renamed to `target_configuration_actor`. This makes the
relationship between the two explicit at the call site
(`target_configuration_name: target_configuration_actor.name()`) and
matches the convention followed by the other actors in the same file.

Testing: No functional changes; `cargo check -p servo-devtools` passes
cleanly.

Part of servo#43606

Signed-off-by: thebabalola <t.babalolajoseph@gmail.com>
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 5, 2026
@mukilan

mukilan commented Apr 5, 2026

Copy link
Copy Markdown
Member

Sorry, the changes in this PR will be superseded by #43915 since that also removes the use of actor variables.

@mukilan mukilan closed this Apr 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-review There is new code that needs to be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants