Skip to content

refactor: remove unnecessary clone() calls across codebase#400

Merged
boykush merged 1 commit intomainfrom
claude/review-rust-quality-W7cTT
Feb 15, 2026
Merged

refactor: remove unnecessary clone() calls across codebase#400
boykush merged 1 commit intomainfrom
claude/review-rust-quality-W7cTT

Conversation

@boykush
Copy link
Owner

@boykush boykush commented Feb 14, 2026

  • Replace into_* methods with as_* reference-returning methods on config
    types (ColorSchemeConfig, LangCodeConfig, SortKeyConfig), eliminating
    clone() in both the methods and their call sites in build/serve commands
  • Change &PathBuf parameters to idiomatic &Path across usecase, MCP tool,
    and service layers (15 functions)
  • Add Tags::iter() method to avoid clone().into_iter() in parallel tag
    rendering
  • Use as_ref().map() instead of clone().map() in Template::title()
  • Reorder operations in markdown convert to eliminate ScrapKey clone

https://claude.ai/code/session_01FdQ9m12gdn8vJ3gKagC9eC

- Replace into_* methods with as_* reference-returning methods on config
  types (ColorSchemeConfig, LangCodeConfig, SortKeyConfig), eliminating
  clone() in both the methods and their call sites in build/serve commands
- Change &PathBuf parameters to idiomatic &Path across usecase, MCP tool,
  and service layers (15 functions)
- Add Tags::iter() method to avoid clone().into_iter() in parallel tag
  rendering
- Use as_ref().map() instead of clone().map() in Template::title()
- Reorder operations in markdown convert to eliminate ScrapKey clone

https://claude.ai/code/session_01FdQ9m12gdn8vJ3gKagC9eC
@github-actions
Copy link

Performance Test Results 🚀

Build Time: 0.985 seconds
Status: ✅ PASS

Executed with: scraps build -v
Repository: boykush/wiki
Runner: Ubuntu latest

@boykush boykush merged commit 2f308ca into main Feb 15, 2026
3 checks passed
@boykush boykush deleted the claude/review-rust-quality-W7cTT branch February 15, 2026 00:12
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.

2 participants