Skip to content

Commit

Permalink
Fixup: Do not copy AbstractString
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobnissen committed Jan 15, 2024
1 parent 216743b commit ee245ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/alphabet.jl
Original file line number Diff line number Diff line change
Expand Up @@ -359,5 +359,4 @@ function guess_alphabet(v::AbstractVector{UInt8})
AminoAcidAlphabet()
end
end
guess_alphabet(s::Union{String, SubString{String}}) = guess_alphabet(codeunits(s))
guess_alphabet(s::AbstractString) = guess_alphabet(String(s))
guess_alphabet(s::AbstractString) = guess_alphabet(codeunits(s))
3 changes: 1 addition & 2 deletions src/longsequences/constructors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,5 +119,4 @@ function guess_parse(s::AbstractVector{UInt8})
A isa Integer && throw(EncodeError(AminoAcidAlphabet(), s[A]))
LongSequence{typeof(A)}(s)
end
guess_parse(s::Union{String, SubString{String}}) = guess_parse(codeunits(s))
guess_parse(s::AbstractString) = guess_parse(String(s))
guess_parse(s::AbstractString) = guess_parse(codeunits(s))

0 comments on commit ee245ee

Please sign in to comment.