[PR #41] [MERGED] [no-issue] refactor modules #68

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

📋 Pull Request Information

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

Base: mainHead: no-issue-refactor-modules


📝 Commits (7)

  • 4aac9da use macro_rules to reduce code duplication in setting switch view shortcuts
  • b2d4b4b use a config module folder
  • 2300df1 fix error in keybindings.rs
  • 0de0742 use a client module folder
  • cbb12a3 reduce import statements, change hn_client to client
  • 90b6bee project can be compiled now!
  • 908c63e reduce import statements

📊 Changes

18 files changed (+987 additions, -1057 deletions)

View changed files

hackernews_tui/src/client/lazy.rs (+79 -0)
hackernews_tui/src/client/mod.rs (+265 -0)
hackernews_tui/src/client/parser.rs (+209 -0)
hackernews_tui/src/client/query.rs (+95 -0)
hackernews_tui/src/config.rs (+0 -254)
📝 hackernews_tui/src/config/keybindings.rs (+28 -7)
hackernews_tui/src/config/mod.rs (+132 -0)
hackernews_tui/src/config/theme.rs (+103 -0)
hackernews_tui/src/hn_client.rs (+0 -656)
📝 hackernews_tui/src/main.rs (+26 -79)
📝 hackernews_tui/src/prelude.rs (+1 -1)
📝 hackernews_tui/src/utils.rs (+1 -2)
📝 hackernews_tui/src/view/article_view.rs (+2 -4)
📝 hackernews_tui/src/view/async_view.rs (+4 -5)
📝 hackernews_tui/src/view/comment_view.rs (+16 -18)
📝 hackernews_tui/src/view/error_view.rs (+0 -1)
📝 hackernews_tui/src/view/search_view.rs (+14 -16)
📝 hackernews_tui/src/view/story_view.rs (+12 -14)

📄 Description

  • use config folder module instead of config.rs and keybindings.rs files
  • use client folder module instead of hn_client.rs file
  • reduce the number of use (import) statements
  • other small refactoring

🔄 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/41 **Author:** [@aome510](https://github.com/aome510) **Created:** 6/26/2021 **Status:** ✅ Merged **Merged:** 6/26/2021 **Merged by:** [@aome510](https://github.com/aome510) **Base:** `main` ← **Head:** `no-issue-refactor-modules` --- ### 📝 Commits (7) - [`4aac9da`](https://github.com/aome510/hackernews-TUI/commit/4aac9daf18b9256e038c46621339d4e9566513c1) use macro_rules to reduce code duplication in setting switch view shortcuts - [`b2d4b4b`](https://github.com/aome510/hackernews-TUI/commit/b2d4b4b015b0492e158cd7419aed9d53bb170608) use a config module folder - [`2300df1`](https://github.com/aome510/hackernews-TUI/commit/2300df1684fca4b56e661cb9a9ae1102c1613661) fix error in keybindings.rs - [`0de0742`](https://github.com/aome510/hackernews-TUI/commit/0de0742152438f42c14f8ccd2fb93f5c26098ed0) use a client module folder - [`cbb12a3`](https://github.com/aome510/hackernews-TUI/commit/cbb12a3bc7aecbe7f5d7a7cb6970f2accd64d6d5) reduce import statements, change hn_client to client - [`90b6bee`](https://github.com/aome510/hackernews-TUI/commit/90b6bee146848c9e8076b785542873cf615ba30a) project can be compiled now! - [`908c63e`](https://github.com/aome510/hackernews-TUI/commit/908c63ec404f66e45d69fd8b5ee5881e189524b6) reduce import statements ### 📊 Changes **18 files changed** (+987 additions, -1057 deletions) <details> <summary>View changed files</summary> ➕ `hackernews_tui/src/client/lazy.rs` (+79 -0) ➕ `hackernews_tui/src/client/mod.rs` (+265 -0) ➕ `hackernews_tui/src/client/parser.rs` (+209 -0) ➕ `hackernews_tui/src/client/query.rs` (+95 -0) ➖ `hackernews_tui/src/config.rs` (+0 -254) 📝 `hackernews_tui/src/config/keybindings.rs` (+28 -7) ➕ `hackernews_tui/src/config/mod.rs` (+132 -0) ➕ `hackernews_tui/src/config/theme.rs` (+103 -0) ➖ `hackernews_tui/src/hn_client.rs` (+0 -656) 📝 `hackernews_tui/src/main.rs` (+26 -79) 📝 `hackernews_tui/src/prelude.rs` (+1 -1) 📝 `hackernews_tui/src/utils.rs` (+1 -2) 📝 `hackernews_tui/src/view/article_view.rs` (+2 -4) 📝 `hackernews_tui/src/view/async_view.rs` (+4 -5) 📝 `hackernews_tui/src/view/comment_view.rs` (+16 -18) 📝 `hackernews_tui/src/view/error_view.rs` (+0 -1) 📝 `hackernews_tui/src/view/search_view.rs` (+14 -16) 📝 `hackernews_tui/src/view/story_view.rs` (+12 -14) </details> ### 📄 Description - use `config` folder module instead of `config.rs` and `keybindings.rs` files - use `client` folder module instead of `hn_client.rs` file - reduce the number of `use` (import) statements - other small refactoring --- <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:24 +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#68
No description provided.