Skip to content

feat: make some methods const#3

Merged
ryota2357 merged 1 commit intoryota2357:mainfrom
lperlaki-contrib:const
Mar 18, 2026
Merged

feat: make some methods const#3
ryota2357 merged 1 commit intoryota2357:mainfrom
lperlaki-contrib:const

Conversation

@lperlaki
Copy link
Copy Markdown
Contributor

allow calling LeanString::len, LeanString::is_empty, LeanString::as_bytes and LeanString::as_str as const fn.

one caveat is that because LeanString implements Drop you cannot assign it to a const and use a reference to that const.

@ryota2357
Copy link
Copy Markdown
Owner

Thank you!

@ryota2357 ryota2357 merged commit dd670e3 into ryota2357:main Mar 18, 2026
7 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