Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements copy-on-write support for field caching by streamlining closure parameter types in multiple cached_field! macro calls. The key changes include:
- Removal of explicit type annotations (e.g. "&Lua, &Self") in closure parameters.
- Consistent update of cached_field! invocations across several modules.
- Alignment with updated mlua API patterns.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yazi-plugin/src/process/output.rs | Removed explicit type annotations in cached_field! calls |
| yazi-plugin/src/macros.rs | Simplified closure signatures in impl_file_fields and macro code |
| yazi-plugin/src/config/plugin.rs | Updated closure parameters from type-annotated to inferred types |
| yazi-plugin/src/bindings/icon.rs | Removed explicit type annotations in cached_field! calls |
| yazi-fm/src/lives/tasks.rs | Changed closure parameter signatures to inferred types |
| yazi-fm/src/lives/tab.rs | Updated cached_field! calls to use type inference |
| yazi-fm/src/lives/preview.rs | Removed explicit closure annotations in cached_field! usage |
| yazi-fm/src/lives/preference.rs | Replaced explicit type annotations for cached_field! calls |
| yazi-fm/src/lives/folder.rs | Updated closure parameters for cached_field! calls |
| yazi-fm/src/lives/files.rs | Simplified closure signature in cached_field! call |
| yazi-binding/src/url.rs | Removed explicit closure annotations and updated cached_field! calls |
| yazi-binding/src/macros.rs | Revised macro implementation with additional type checks and an explicit cast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See mlua-rs/mlua#557