-
Notifications
You must be signed in to change notification settings - Fork 458
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): move move logic from fn metadata(&self) -> Arc<AccessorInfo> to impl<A: Access> Layer<A> for CompleteLayer #4896
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Lzzzt <[email protected]>
Signed-off-by: Lzzzt <[email protected]>
Signed-off-by: Lzzzt <[email protected]>
core/src/layers/complete.rs
Outdated
@@ -382,7 +389,7 @@ impl<A: Access> LayeredAccess for CompleteAccessor<A> { | |||
|
|||
// Todo: May move the logic to the implement of Layer::layer of CompleteAccessor<A> | |||
fn metadata(&self) -> Arc<AccessorInfo> { | |||
let mut meta = (*self.meta).clone(); | |||
let mut meta = self.meta.as_ref().clone(); | |||
let cap = meta.full_capability_mut(); | |||
if cap.list && cap.write_can_empty { |
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.
Maybe we can remove those code and the 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.
if we do this, the issue #4888 is not resolved....
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.
if we do this, the issue #4888 is not resolved....
Could you elaborate further? I'm not sure which issue remains unresolved.
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.
Maybe we can remove those code and the comment?
you means delete the
// Todo: May move the logic to the implement of Layer::layer of CompleteAccessor<A>
and
let mut meta = self.meta.as_ref().clone();
?
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.
Yep, since we have created the Arc<AccessInfo>
during layer()
, we can remove the dup code here.
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.
that's my problem, sry.
Signed-off-by: Hanchin Hsieh <[email protected]>
* feat(user_metadata): support user defined metadata for oss * fix cargo fmt && doc tests * Add user metadata key checks for oss && refeactor some code * remove unused code
Signed-off-by: Lzzzt <[email protected]>
The C/C++ test failed, which is a bit weird. I'll try to figure out what happened. I'm guessing it's related to our |
Which issue does this PR close?
Closes #4888
What changes are included in this PR?
mentioned in #4888
Are there any user-facing changes?
No