Skip to content

Remove redundant clones#845

Merged
spacebear21 merged 1 commit into
payjoin:masterfrom
shinghim:clone
Jul 11, 2025
Merged

Remove redundant clones#845
spacebear21 merged 1 commit into
payjoin:masterfrom
shinghim:clone

Conversation

@shinghim

@shinghim shinghim commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Ran clippy::redundant_clone and fixed the redundant clones

@coveralls

coveralls commented Jul 2, 2025

Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 16014508825

Details

  • 20 of 21 (95.24%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 84.882%

Changes Missing Coverage Covered Lines Changed/Added Lines %
payjoin-cli/src/app/v2/mod.rs 2 3 66.67%
Totals Coverage Status
Change from base Build 16013572147: -0.01%
Covered Lines: 7243
Relevant Lines: 8533

💛 - Coveralls

@shinghim
shinghim marked this pull request as ready for review July 9, 2025 01:22

@nothingmuch nothingmuch left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

utACK, assuming this is clippy --fix's doing.

Feel free to ignore my suggestion

Comment thread payjoin-cli/src/db/v2.rs

pub fn from_id(db: Arc<Database>, id: SessionId) -> crate::db::Result<Self> {
Ok(Self { db: db.clone(), session_id: id })
Ok(Self { db, session_id: id })

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

how is github so terrible

image

anyway this is pure bikeshedding but if the param is renamed from id to session_id this can be a little bit prettier

Suggested change
Ok(Self { db, session_id: id })
Ok(Self { db, session_id })

@arminsabouri arminsabouri left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

utACK a58d790
In the future, please put the command you ran in the commit message (if these fixes were automated)

@spacebear21
spacebear21 merged commit 5a436f3 into payjoin:master Jul 11, 2025
7 checks passed
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.

5 participants