Skip to content

Minor clean-up#45

Merged
hecrj merged 2 commits into
iced-rs:masterfrom
memoryruins:smol-changes
Nov 7, 2019
Merged

Minor clean-up#45
hecrj merged 2 commits into
iced-rs:masterfrom
memoryruins:smol-changes

Conversation

@memoryruins
Copy link
Copy Markdown
Contributor

@memoryruins memoryruins commented Nov 7, 2019

This PR utilizes std's impls for text_input and makes use of mem::take in the todo example.

@memoryruins
Copy link
Copy Markdown
Contributor Author

Ah the life of only having nightly installed on this desktop has gotten the best of me; mem::take stabilizes in 1.40 🤦. In that case, we can use std::mem::replace(&mut self.text_input, String::default()) or I can revert that commit altogether.

Copy link
Copy Markdown
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Thank you! These are nice changes! ❤️

I take note of from_iter and to_vec ✍️

Comment thread examples/todos.rs Outdated
@hecrj hecrj added the improvement An internal improvement label Nov 7, 2019
@hecrj hecrj added this to the 0.1.0 milestone Nov 7, 2019
Copy link
Copy Markdown
Member

@hecrj hecrj left a comment

Choose a reason for hiding this comment

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

Awesome. Thank you! 🎉


string
use std::iter::FromIterator;
String::from_iter(self.0.iter())
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note to anyone looking in from the changelog: this could have been self.0.iter().collect() :)
micro-refactoring intensifies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement An internal improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants