Skip to content

revert: Document constructor changed in #399#410

Merged
medcl merged 1 commit intomainfrom
refactor/Document_constructor
Apr 22, 2025
Merged

revert: Document constructor changed in #399#410
medcl merged 1 commit intomainfrom
refactor/Document_constructor

Conversation

@SteveLauC
Copy link
Copy Markdown
Member

What does this PR do

Revert the change to Document::new() in introduced in PR #399

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

@SteveLauC SteveLauC requested review from ayangweb and Copilot April 22, 2025 07:28
Copy link
Copy Markdown

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 reverts the previously introduced changes to the Document constructor from PR #399. The changes update how Document instances are constructed in multiple modules.

  • In CalculatorSource, the instantiation has been changed from using Document::new(Document { … }) to directly constructing a Document using a struct literal.
  • In ApplicationSearchSource, the constructor now calls Document::new with a new signature accepting separate parameters, reverting the previous pattern.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src-tauri/src/local/calculator.rs Reverts Document instantiation to a struct literal in CalculatorSource.
src-tauri/src/local/application.rs Reverts the Document constructor usage by invoking Document::new with separate parameters.
src-tauri/src/common/document.rs Updates Document::new to a multi-parameter signature for constructing Document.

Comment thread src-tauri/src/local/calculator.rs
@medcl medcl merged commit 6d8fa81 into main Apr 22, 2025
@medcl medcl deleted the refactor/Document_constructor branch April 22, 2025 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants