changed weak link serialization to use restEncoder
This commit is contained in:
parent
77cce5e500
commit
aade85d6f1
@ -8,7 +8,9 @@ import {
|
|||||||
createID,
|
createID,
|
||||||
getItemCleanStart,
|
getItemCleanStart,
|
||||||
callTypeObservers,
|
callTypeObservers,
|
||||||
YWeakLinkRefID
|
YWeakLinkRefID,
|
||||||
|
writeID,
|
||||||
|
readID
|
||||||
} from "../internals.js"
|
} from "../internals.js"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -132,7 +134,7 @@ export class YWeakLink extends AbstractType {
|
|||||||
encoder.writeTypeRef(YWeakLinkRefID)
|
encoder.writeTypeRef(YWeakLinkRefID)
|
||||||
const flags = 0 // flags that could be used in the future
|
const flags = 0 // flags that could be used in the future
|
||||||
encoding.writeUint8(encoder.restEncoder, flags)
|
encoding.writeUint8(encoder.restEncoder, flags)
|
||||||
encoder.writeLeftID(this._id)
|
writeID(encoder.restEncoder, this._id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,7 +145,7 @@ export class YWeakLink extends AbstractType {
|
|||||||
*/
|
*/
|
||||||
export const readYWeakLink = decoder => {
|
export const readYWeakLink = decoder => {
|
||||||
const flags = decoding.readUint8(decoder.restDecoder)
|
const flags = decoding.readUint8(decoder.restDecoder)
|
||||||
const id = decoder.readLeftID()
|
const id = readID(decoder.restDecoder)
|
||||||
return new YWeakLink(id, null)
|
return new YWeakLink(id, null)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user