[PR #81] [MERGED] RFC: Use Vec<char> for input instead of String #596

Closed
opened 2026-02-28 14:50:09 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/81
Author: @fangyi-zhou
Created: 10/18/2019
Status: Merged
Merged: 10/20/2019
Merged by: @Rigellute

Base: masterHead: input-vec


📝 Commits (4)

  • ec56258 Use Vec for input instead of String
  • e2bfec2 Rustfmt
  • 14f03d5 Use input_idx instead of input_cursor_position
  • 8d798ab Fix unexpected space

📊 Changes

3 files changed (+39 additions, -39 deletions)

View changed files

📝 src/app.rs (+2 -2)
📝 src/handlers/input.rs (+35 -36)
📝 src/ui/mod.rs (+2 -1)

📄 Description

This may make it easier to handle inputs since we do not have to care
about character boundaries in Strings.

See #30

I'm not sure whether this is a good idea performance-wise, I would like
to hear your opinions


🔄 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/Rigellute/spotify-tui/pull/81 **Author:** [@fangyi-zhou](https://github.com/fangyi-zhou) **Created:** 10/18/2019 **Status:** ✅ Merged **Merged:** 10/20/2019 **Merged by:** [@Rigellute](https://github.com/Rigellute) **Base:** `master` ← **Head:** `input-vec` --- ### 📝 Commits (4) - [`ec56258`](https://github.com/Rigellute/spotify-tui/commit/ec5625864bfea0952519f40af59486954345bcc8) Use Vec<char> for input instead of String - [`e2bfec2`](https://github.com/Rigellute/spotify-tui/commit/e2bfec2086f31d72e388dacb007f7c0813a99106) Rustfmt - [`14f03d5`](https://github.com/Rigellute/spotify-tui/commit/14f03d5cb038b41f8b5776b2a5453c289787a907) Use `input_idx` instead of `input_cursor_position` - [`8d798ab`](https://github.com/Rigellute/spotify-tui/commit/8d798ab3bc40f47734ee1b60a29b4954d91bebc5) Fix unexpected space ### 📊 Changes **3 files changed** (+39 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `src/app.rs` (+2 -2) 📝 `src/handlers/input.rs` (+35 -36) 📝 `src/ui/mod.rs` (+2 -1) </details> ### 📄 Description This may make it easier to handle inputs since we do not have to care about character boundaries in Strings. See #30 I'm not sure whether this is a good idea performance-wise, I would like to hear your opinions --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:50:09 +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/spotify-tui#596
No description provided.