Skip to content

Commit 5698d3e

Browse files
committed
Fix duplicate UnmarshalJSON func for SyncData
1 parent 1c0e4cd commit 5698d3e

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

db/document.go

-19
Original file line numberDiff line numberDiff line change
@@ -99,25 +99,6 @@ type SyncData struct {
9999
currentRevChannels base.Set // A base.Set of the current revision's channels (determined by SyncData.Channels at UnmarshalJSON time)
100100
}
101101

102-
func (sd *SyncData) UnmarshalJSON(b []byte) error {
103-
104-
// type alias avoids UnmarshalJSON stack overflow (forces fallback to standard JSON unmarshal instead of this one)
105-
type stdSyncData SyncData
106-
var tmp stdSyncData
107-
108-
err := base.JSONUnmarshal(b, &tmp)
109-
if err != nil {
110-
return err
111-
}
112-
113-
*sd = SyncData(tmp)
114-
115-
// determine current revision's channels and store in-memory (avoids Channels iteration at access-check time)
116-
sd.currentRevChannels = sd.getCurrentChannels()
117-
118-
return nil
119-
}
120-
121102
// determine set of current channels based on removal entries.
122103
func (sd *SyncData) getCurrentChannels() base.Set {
123104
ch := base.SetOf()

0 commit comments

Comments
 (0)