| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
ToString() here results in an allocation, can we just update that method to accept a readonlyspan?
Sorry, something went wrong.
There was a problem hiding this comment.
No, it is used then in class ctor-s.
Sorry, something went wrong.
There was a problem hiding this comment.
ReadOnlySpan<char> typically is an implicit cast from string, isn't it?
Sorry, something went wrong.
There was a problem hiding this comment.
Rain Sallow (/u/ta11ow) (@vexx32) No, only string -> ReadOnlySpan
Sorry, something went wrong.
There was a problem hiding this comment.
Right, so if the method parameter is currently using string we should be able to change it to ReadOnlySpan<char> and have the implicit cast handle it, shouldn't we? Or am I missing some context here? 🙂
Sorry, something went wrong.
There was a problem hiding this comment.
I missing some context here
CreateParameterWithArgument() passes the string to a constructor so it makes no sense to convert to span here.
Sorry, something went wrong.
|
Added new commit. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
There was a problem hiding this comment.
Please use multiple statements for better readability, like
var filterSpan = filter.AsSpan(0, filter.Length - 2); return commandName.AsSpan().Contains(filterSpan, StringComparison.OrdinalIgnoreCase);
Sorry, something went wrong.
There was a problem hiding this comment.
Fixed.
Sorry, something went wrong.
There was a problem hiding this comment.
same here :)
Sorry, something went wrong.
There was a problem hiding this comment.
Fixed.
Sorry, something went wrong.
|
🎉v7.1.0-preview.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
PR Summary
PR Context
PR Checklist