-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(core)!: Return Arc<AccessInfo>
for metadata
#4883
Conversation
…metadata Signed-off-by: Lzzzt <liuzitao0123@gmail.com>
One question: using |
Replied at #4845 (comment) |
d6ce514
to
e45455f
Compare
@@ -380,13 +380,14 @@ impl<A: Access> LayeredAccess for CompleteAccessor<A> { | |||
&self.inner | |||
} | |||
|
|||
fn metadata(&self) -> AccessorInfo { | |||
let mut meta = self.meta.clone(); | |||
// Todo: May move the logic to the implement of Layer::layer of CompleteAccessor<A> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice idea, we can create an issue for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the issue can be create after this refactor is done, because this may be related to the #4845 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other LGTM, thanks!
Operator
add a field to store OperatorInfo
Arc<AccessInfo>
for metadata
b4c9cfa
to
e39efee
Compare
Signed-off-by: Lzzzt <liuzitao0123@gmail.com> refactor: change the signature of `Access::info` and `AccessDyn::info` Signed-off-by: Lzzzt <liuzitao0123@gmail.com> refactor: change the signature of `Access::info` and `AccessDyn::info` Signed-off-by: Lzzzt <liuzitao0123@gmail.com> revert: revert Signed-off-by: Lzzzt <liuzitao0123@gmail.com> revert: revert Signed-off-by: Lzzzt <liuzitao0123@gmail.com> Update store.rs refactor: change the signature of `Access::info` and `AccessDyn::info` Signed-off-by: Lzzzt <liuzitao0123@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, thanks a lot!
Just add a field inside the
Operator
struct and wrap theOperatorInfo
withOnceCell<Arc<T>>
for lazy initialize and avoid other memory allocation.#4845