Closed ernado closed 5 years ago
Merging #19 into master will not change coverage. The diff coverage is
100%
.
@@ Coverage Diff @@
## master #19 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 19 19
Lines 1207 1209 +2
=====================================
+ Hits 1207 1209 +2
Impacted Files | Coverage Δ | |
---|---|---|
message.go | 100% <100%> (ø) |
:arrow_up: |
textattrs.go | 100% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 8136435...1fa2bd2. Read the comment docs.
While retrospectively reviewing the stun library I've discovered some things that I've missed during refactoring iterations.
1) The
grow
method actual usage expects different implementation. 2) Text attributes likeNonce
are doing implicit copy instead of referencing the original buffer.This PR addresses both issues. I see no backward incompatible changes except probable misuse of text attributes, e.g. using decoded
Nonce
after correspondingm.Raw
is invalidated and reused.The 1 will optimize memory allocation and fix possible unexpectedly big
m.Raw
-s, the 2 speed-up theNonce
,Username
and other text attributes decode time and memory consumption.