Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Changed parameter type from String to &str#37

Merged
gauravgahlot merged 4 commits intogauravgahlot:mainfrom
yashisrani:fix/parameter-changes
Jan 28, 2025
Merged

Changed parameter type from String to &str#37
gauravgahlot merged 4 commits intogauravgahlot:mainfrom
yashisrani:fix/parameter-changes

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.

Signed-off-by: Yash Israni <yashisrani52@gmail.com>
@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 <yashisrani52@gmail.com>
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.

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