Skip to content

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

Merged
wedsonaf merged 1 commit intoRust-for-Linux:rustfrom
wedsonaf:file-operations
Jun 23, 2021
Merged

rust: update FileOperations to use arbitrary type from PointerWrapper.#387
wedsonaf merged 1 commit intoRust-for-Linux:rustfrom
wedsonaf:file-operations

Conversation

@wedsonaf
Copy link
Copy Markdown

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 wedsonaf@google.com

@ksquirrel

This comment has been minimized.

@ksquirrel

This comment has been minimized.

@ksquirrel

This comment has been minimized.

@wedsonaf
Copy link
Copy Markdown
Author

v1 -> v2

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

Copy link
Copy Markdown
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 <wedsonaf@google.com>
@ksquirrel
Copy link
Copy Markdown
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