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

Changed parameter type from String to &str #37

Merged
merged 4 commits into from
Jan 28, 2025

Conversation

yashisrani
Copy link
Contributor

@yashisrani yashisrani commented Jan 26, 2025

Fixed #26

Title: Change parameter type from String to &str

Description

  • This PR changes parameter fromString to &str to improve performance by avoiding unnecessary heap allocation.
  • The new method has been updated to accept a &str, and a lifetime parameter has been added to the struct for proper reference management.

@gauravgahlot
Copy link
Owner

@yashisrani Thanks for looking into this. Could you fix the CI reported errors please?

Also, in the meantime, let's keep the PR as draft.

@gauravgahlot gauravgahlot marked this pull request as draft January 27, 2025 12:02
Signed-off-by: Yash Israni <[email protected]>
@yashisrani yashisrani marked this pull request as ready for review January 27, 2025 14:42
Copy link
Owner

@gauravgahlot gauravgahlot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert the Changelog.md, since it's not related to the issue being addressed here.

@yashisrani
Copy link
Contributor Author

yashisrani commented Jan 28, 2025

Please revert the Changelog.md, since it's not related to the issue being addressed here.

@gauravgahlot Sir, I deleted the changelog.md file. I think now all is well in this pull request. I done some silly mistakes. sorry of that 😥.

@gauravgahlot
Copy link
Owner

Thank you @yashisrani

@gauravgahlot gauravgahlot merged commit 500af95 into gauravgahlot:main Jan 28, 2025
3 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.

Change parameter type from String to &str (string slice)
2 participants