Skip to content

Conversation

@sxyazi
Copy link
Owner

@sxyazi sxyazi commented Apr 16, 2025

@sxyazi sxyazi requested a review from Copilot April 16, 2025 12:06
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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

@sxyazi sxyazi merged commit 510cb14 into main Apr 16, 2025
6 checks passed
@sxyazi sxyazi deleted the pr-9266be36 branch April 16, 2025 12:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants