Skip to content

Use Parameter type alias for HashMap<String, ParameterValue>.#473

Open
teunbrand wants to merge 1 commit into
posit-dev:mainfrom
teunbrand:parameters-rollout
Open

Use Parameter type alias for HashMap<String, ParameterValue>.#473
teunbrand wants to merge 1 commit into
posit-dev:mainfrom
teunbrand:parameters-rollout

Conversation

@teunbrand

Copy link
Copy Markdown
Collaborator

This PR aims to fix a personal annoyance.

An alias is nicer to read that having to to mentally translate 'HashMap<String, ParameterValue>' to 'list of parameters' all the time throughout the code base. I contemplated make it a struct with its own methods like Parameters.get_number("key") and whatnot, but decided losing the HashMap methods might be worse.

Replace all `HashMap<String, ParameterValue>` type annotations and
`HashMap::new()` calls (where the result is typed as Parameters) with
the `Parameters` type alias defined in `plot/types.rs`. Re-export
`Parameters` from `lib.rs` for external consumers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@teunbrand teunbrand marked this pull request as ready for review June 12, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant