Skip to content

Convert String args to &str #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 22, 2024
Merged

Convert String args to &str #34

merged 7 commits into from
Jul 22, 2024

Conversation

ericapywang
Copy link
Contributor

@ericapywang ericapywang commented Jul 19, 2024

Problem

Currently, we are not being consistent with how we pass strings into functions. Control plane takes in a &str while data plane takes in a String.

Solution

I updated all endpoints to take in a &str instead of a String. This allows for the user to determine the lifetime of string variables that they pass in.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

Test cases should pass

@ericapywang ericapywang marked this pull request as ready for review July 22, 2024 13:45
@ericapywang ericapywang requested a review from ssmith-pc July 22, 2024 15:00
@ericapywang ericapywang merged commit 9af6be0 into main Jul 22, 2024
1 check passed
@ericapywang ericapywang deleted the erica/string-to-str branch July 22, 2024 22:03
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.

2 participants