Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Clone derive for primitive structs #10730

Merged
merged 1 commit into from
Mar 8, 2024
Merged

Conversation

kobayurii
Copy link
Member

This pull request adds the Clone derive for specified primitive structs, enabling easy creation of deep copies. It improves usability, consistency, and readability while adhering to Rust conventions.

Why This Matters:

  • Enhanced Usability: With the Clone trait implemented, users can easily create copies of these structs without manually implementing the clone functionality, which improves usability and reduces boilerplate code.

  • Consistency and Readability: By ensuring consistency in our codebase and following Rust conventions, we enhance code readability and maintainability.

  • Performance: While cloning can incur performance overhead, it's often necessary in certain contexts, and having it readily available can streamline development processes.

@kobayurii kobayurii requested a review from a team as a code owner March 8, 2024 08:29
@kobayurii kobayurii requested a review from Longarithm March 8, 2024 08:29
Copy link
Member

@khorolets khorolets left a comment

Choose a reason for hiding this comment

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

This is something developers from the community have been dreaming for last ~4 years 😅

@nagisa nagisa enabled auto-merge March 8, 2024 10:06
@nagisa nagisa added this pull request to the merge queue Mar 8, 2024
Merged via the queue into near:master with commit 4429cc8 Mar 8, 2024
22 of 24 checks passed
kobayurii added a commit to kobayurii/nearcore that referenced this pull request Mar 20, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
khorolets pushed a commit that referenced this pull request Apr 4, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
khorolets pushed a commit that referenced this pull request Apr 9, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request Apr 9, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request Apr 23, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
khorolets pushed a commit that referenced this pull request Apr 23, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 13, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 13, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 13, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 13, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 14, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 14, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 14, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
kobayurii added a commit to kobayurii/nearcore that referenced this pull request May 14, 2024
This pull request adds the Clone derive for specified primitive structs,
enabling easy creation of deep copies. It improves usability,
consistency, and readability while adhering to Rust conventions.

**Why This Matters:**

- **Enhanced Usability:** With the `Clone` trait implemented, users can
easily create copies of these structs without manually implementing the
clone functionality, which improves usability and reduces boilerplate
code.

- **Consistency and Readability:** By ensuring consistency in our
codebase and following Rust conventions, we enhance code readability and
maintainability.

- **Performance:** While cloning can incur performance overhead, it's
often necessary in certain contexts, and having it readily available can
streamline development processes.
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.

4 participants