Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made the list of exercises searchable, ref #2093 #2098

Merged
merged 16 commits into from
Sep 3, 2024
Merged

Conversation

frroossst
Copy link
Contributor

No description provided.

Copy link
Contributor

@mo8it mo8it left a comment

Choose a reason for hiding this comment

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

Very good implementation so far. Only small changes are required :)

src/list.rs Show resolved Hide resolved
src/list.rs Outdated Show resolved Hide resolved
src/list.rs Outdated Show resolved Hide resolved
src/list.rs Outdated Show resolved Hide resolved
src/list.rs Outdated Show resolved Hide resolved
src/list.rs Show resolved Hide resolved
src/list/state.rs Outdated Show resolved Hide resolved
src/list/state.rs Show resolved Hide resolved
src/list/state.rs Outdated Show resolved Hide resolved
}
None => {
let msg = String::from(" (not found)");
self.message.push_str(&msg);
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to create a String here (it allocates). .push_str(" (not found)") is enough.

match curr_key {
KeyCode::Esc | KeyCode::Enter => {
is_searching = false;
list_state.search_query.clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably need to draw here to remove the search query. I will test it.

@mo8it
Copy link
Contributor

mo8it commented Sep 3, 2024

I will take care of the two comments myself. Merging for now. Very well implemented. Thank you! :D

@mo8it mo8it merged commit 20616ff into rust-lang:main Sep 3, 2024
7 checks passed
@mo8it
Copy link
Contributor

mo8it commented Sep 3, 2024

I made the final touches in da8b3d1, mostly subjective changes :)

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