mirror of
https://github.com/metabarcoding/obitools4.git
synced 2025-12-08 16:50:27 +00:00
Reduce redundante call to bytes.ToLower and substitute the last call by an home made version doing the conversion in place
Former-commit-id: d9ea22f649d97be352f8dbb37acc1495df830118
This commit is contained in:
@@ -11,10 +11,10 @@
|
||||
package obiseq
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/md5"
|
||||
"sync/atomic"
|
||||
|
||||
"git.metabarcoding.org/lecasofts/go/obitools/pkg/obiutils"
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
@@ -210,7 +210,6 @@ func (s *BioSequence) Source() string {
|
||||
return s.source
|
||||
}
|
||||
|
||||
|
||||
// Returning the MD5 hash of the sequence.
|
||||
func (s *BioSequence) MD5() [16]byte {
|
||||
return md5.Sum(s.sequence)
|
||||
@@ -244,7 +243,7 @@ func (s *BioSequence) SetSequence(sequence []byte) {
|
||||
if s.sequence != nil {
|
||||
RecycleSlice(&s.sequence)
|
||||
}
|
||||
s.sequence = bytes.ToLower(sequence)
|
||||
s.sequence = obiutils.InPlaceToLower(sequence)
|
||||
}
|
||||
|
||||
// Setting the qualities of the BioSequence.
|
||||
|
||||
Reference in New Issue
Block a user