Skip to content

rust: update FileOperations to use arbitrary type from PointerWrapper. #387

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

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

wedsonaf
Copy link

This allows FileOperations implementers to have arbitrary (wrapped)
values as private_data (as opposed to only wrapped Self).

It also allows wrappers to dictate the borrowed type. For now all
wrappers of T just borrow &T, but in a subsequent PR Ref<T> will
borrow to &Ref<T>, which allows implementations to increment the
refcount.

This is based on #386.

Signed-off-by: Wedson Almeida Filho [email protected]

@ksquirrel

This comment has been minimized.

@ksquirrel

This comment has been minimized.

@ksquirrel

This comment has been minimized.

@wedsonaf
Copy link
Author

v1 -> v2

  • Rebase
  • Use &f instead of f.deref()

Copy link
Collaborator

@TheSven73 TheSven73 left a comment

Choose a reason for hiding this comment

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

LGTM after this gets rebased.

…per`.

This allows `FileOperations` implementers to have arbitrary (wrapped)
values as `private_data` (as opposed to only wrapped `Self`).

It also allows wrappers to dictate the borrowed type. For now all
wrappers of `T` just borrow `&T`, but in a subsequent PR `Ref<T>` will
borrow to `&Ref<T>`, which allows implementations to increment the
refcount.

Signed-off-by: Wedson Almeida Filho <[email protected]>
@ksquirrel
Copy link
Member

Review of 2117c9ffdcf9:

  • ✔️ Commit 2117c9f: Looks fine!

@wedsonaf wedsonaf merged commit e428010 into Rust-for-Linux:rust Jun 23, 2021
@wedsonaf wedsonaf deleted the file-operations branch June 23, 2021 15:51
@adamrk adamrk mentioned this pull request Jun 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants