[PR #38] [MERGED] Reduce code boilerplate P1 #60

Closed
opened 2026-03-14 12:30:08 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/aome510/hackernews-TUI/pull/38
Author: @aome510
Created: 6/6/2021
Status: Merged
Merged: 6/6/2021
Merged by: @aome510

Base: mainHead: reduce-boilerplate-p1


📝 Commits (3)

  • 829d127 use static HNClient
  • 26f48be use onecell for setting up static client
  • 249b8c3 reduce clone usage

📊 Changes

9 files changed (+198 additions, -223 deletions)

View changed files

📝 src/config.rs (+1 -1)
📝 src/hn_client.rs (+16 -5)
📝 src/main.rs (+60 -75)
📝 src/view/article_view.rs (+5 -5)
📝 src/view/async_view.rs (+64 -66)
📝 src/view/comment_view.rs (+13 -17)
📝 src/view/help_view.rs (+2 -2)
📝 src/view/search_view.rs (+15 -17)
📝 src/view/story_view.rs (+22 -35)

📄 Description

  • reduce number of clones
  • use static HNClient

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/aome510/hackernews-TUI/pull/38 **Author:** [@aome510](https://github.com/aome510) **Created:** 6/6/2021 **Status:** ✅ Merged **Merged:** 6/6/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `reduce-boilerplate-p1` --- ### 📝 Commits (3) - [`829d127`](https://github.com/aome510/hackernews-TUI/commit/829d127b94b45925705473d29215319acdaebdc8) use static HNClient - [`26f48be`](https://github.com/aome510/hackernews-TUI/commit/26f48be0f5d2cda4d9198911e65387735166c2d7) use onecell for setting up static client - [`249b8c3`](https://github.com/aome510/hackernews-TUI/commit/249b8c31f566402998bcab3ee44391f760c19479) reduce clone usage ### 📊 Changes **9 files changed** (+198 additions, -223 deletions) <details> <summary>View changed files</summary> 📝 `src/config.rs` (+1 -1) 📝 `src/hn_client.rs` (+16 -5) 📝 `src/main.rs` (+60 -75) 📝 `src/view/article_view.rs` (+5 -5) 📝 `src/view/async_view.rs` (+64 -66) 📝 `src/view/comment_view.rs` (+13 -17) 📝 `src/view/help_view.rs` (+2 -2) 📝 `src/view/search_view.rs` (+15 -17) 📝 `src/view/story_view.rs` (+22 -35) </details> ### 📄 Description - reduce number of clones - use static `HNClient` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-14 12:30:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hackernews-TUI#60
No description provided.