-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I was looking into fixing #15 but realized that the special casing of `InlineString1` to only have one byte makes that not work. I would say that the current special casing of `InlineString1` creates quite a bit of confusing behavior: ``` julia> InlineString("") |> typeof String3 julia> InlineString("a") |> typeof String1 ``` Why would an empty string take more place than a one letter string? ``` julia> String1("") ERROR: ArgumentError: string too large (0) to convert to String1 Stacktrace: [1] stringtoolong(T::Type, n::Int64) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:321 [2] String1(x::String) @ InlineStrings ~/.julia/packages/InlineStrings/xUsry/src/InlineStrings.jl:208 [3] top-level scope @ REPL[4]:1 julia> String3("") "" ``` Wut? There is nothing in the documentation that indicates this type of special behavior. I'm sure there is some reason for doing this since so much pain seems to have been gone through to do it but I thought I would put up this PR nonetheless. Fixes #73 Fixes #72
- Loading branch information
1 parent
3458995
commit e375be8
Showing
3 changed files
with
35 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.