Skip to content
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

Minor changes to options file #255

Merged
merged 2 commits into from
Apr 17, 2024
Merged

Minor changes to options file #255

merged 2 commits into from
Apr 17, 2024

Conversation

AayushyaVajpayee
Copy link
Contributor

What kind of change does this PR introduce?

2 changes which are minor refactor of the code.

  1. Use ok_or_else instead of ok_or. This change prevents the string allocation happening on every method call to only happen when there is an error.
  2. SImplify nested if else block check_option_contain method. Also use format! macro to prevent to have only one string allocation instead of 2.

What is the current behavior?

No change in behaviour
Please link any relevant issues here.

What is the new behavior?

No change in behaviour
Feel free to include screenshots if it includes visual changes.

Additional context

Add any other context or screenshots.

2. simplify nest if else
@imor
Copy link
Contributor

imor commented Apr 17, 2024

@AayushyaVajpayee thanks for the PR. Could you please run cargo fmt to fix the formatting failure.

@AayushyaVajpayee
Copy link
Contributor Author

@AayushyaVajpayee thanks for the PR. Could you please run cargo fmt to fix the formatting failure.

thanks. fixed formattting

@imor imor merged commit a9eb0a5 into supabase:main Apr 17, 2024
2 checks passed
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