Skip to content

refactor: use slices.Equal to simplify code#13002

Merged
rvagg merged 1 commit intofilecoin-project:masterfrom
xixishidibei:master
Apr 2, 2025
Merged

refactor: use slices.Equal to simplify code#13002
rvagg merged 1 commit intofilecoin-project:masterfrom
xixishidibei:master

Conversation

@xixishidibei
Copy link
Copy Markdown
Contributor

@xixishidibei xixishidibei commented Apr 2, 2025

Related Issues

Proposed Changes

There is a new function added in the go1.21 standard library, which can make the code more concise and easy to read.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

Signed-off-by: xixishidibei <xixishidibei@outlook.com>
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FilOz Apr 2, 2025
@rvagg rvagg requested a review from Copilot April 2, 2025 21:30
Copy link
Copy Markdown
Contributor

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 refactors the TipSet.Equals method to use the new standard library function slices.Equal, simplifying the code and improving readability.

  • Replaces manual loop with slices.Equal for slice comparison.
  • Adds the slices import to support the new function.

@github-project-automation github-project-automation Bot moved this from 📌 Triage to ✔️ Approved by reviewer in FilOz Apr 2, 2025
@rvagg rvagg added the skip/changelog This change does not require CHANGELOG.md update label Apr 2, 2025
@rvagg rvagg merged commit 592cf45 into filecoin-project:master Apr 2, 2025
92 of 96 checks passed
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FilOz Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip/changelog This change does not require CHANGELOG.md update

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

3 participants