Skip to content
This repository has been archived by the owner on Aug 28, 2021. It is now read-only.

Encoding needs to be aware of lazy-loading #41

Merged
merged 1 commit into from
Jul 16, 2015

Conversation

arv
Copy link
Contributor

@arv arv commented Jul 15, 2015

Keep using futures in the encoding

Fixes #23

@arv
Copy link
Contributor Author

arv commented Jul 15, 2015

Need to add test too

var getRef = func(v Value) ref.Ref {
type RefGetter func(v Value) ref.Ref

var getRefOverride RefGetter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since RefGetter type is not referred to anywhere else:

a) it can be private (refGetter)
b) you don't even need it - just define the type inline - var getRefOverride func(v Value) ref.Ref

@arv arv force-pushed the encode-skip-deref branch 2 times, most recently from f233460 to 026cd8d Compare July 15, 2015 22:33
@arv
Copy link
Contributor Author

arv commented Jul 15, 2015

PTAL

count := 0
getRef = func(val Value) ref.Ref {
getRefOverride = func(val Value) ref.Ref {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is actually better.

@arv
Copy link
Contributor Author

arv commented Jul 16, 2015

PTAL

I updated the tests

Keep using futures in the encoding

Fixes #23
@arv arv merged commit e41f82a into attic-labs:master Jul 16, 2015
@arv arv deleted the encode-skip-deref branch July 16, 2015 15:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants