idea: move logic from fn metadata(&self) -> Arc<AccessorInfo>
to impl<A: Access> Layer<A> for CompleteLayer
#4888
Labels
fn metadata(&self) -> Arc<AccessorInfo>
to impl<A: Access> Layer<A> for CompleteLayer
#4888
Feature Description
Since the
CompleteAccessor
stores the metadata, andAccess::info
return theArc<AccessorInfo>
, we can move logic fromfn metadata(&self) -> Arc<AccessorInfo>
toimpl<A: Access> Layer<A> for CompleteLayer
to avoid creating a newArc<AccessorInfo>
(this is not add the reference count).Problem and Solution
just change
CompleteAccessor::metadata
:to
and change
CompleteLayer::layer
:to
Additional Context
All the layers that store the metadata can apply this change.
Are you willing to contribute to the development of this feature?
The text was updated successfully, but these errors were encountered: