Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

devtools helpers extended #1186

Merged
merged 2 commits into from
Jun 2, 2016
Merged

devtools helpers extended #1186

merged 2 commits into from
Jun 2, 2016

Conversation

NikVolf
Copy link
Contributor

@NikVolf NikVolf commented May 31, 2016

  • stop guard
  • random strings

@NikVolf NikVolf added the A0-pleasereview 🤓 Pull request needs code review. label May 31, 2016
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.

//! Random path
Copy link
Contributor

Choose a reason for hiding this comment

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

leftover doc comment

}

pub fn random_str(len: usize) -> String {
(0..len).map(|_| ((random::<f32>() * 26.0) as u8 + 97) as char).collect()
Copy link
Contributor

Choose a reason for hiding this comment

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

random_alpha_lowercase might be a more descriptive name

Copy link
Contributor Author

@NikVolf NikVolf May 31, 2016

Choose a reason for hiding this comment

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

better keep it small until we have more than just one

Copy link
Contributor

@gavofyork gavofyork May 31, 2016

Choose a reason for hiding this comment

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

random::<f32>? really? what about plain old random::<u8>() % 26?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It is not strictly uniform, not that it matters in this function

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is not used anywhere except tests and it's been there for ages
it is not about this pr

@gavofyork gavofyork added A8-looksgood 🦄 Pull request is reviewed well. A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. and removed A0-pleasereview 🤓 Pull request needs code review. A8-looksgood 🦄 Pull request is reviewed well. labels May 31, 2016
@NikVolf NikVolf added A0-pleasereview 🤓 Pull request needs code review. and removed A6-mustntgrumble 💦 Pull request has areas for improvement. The author need not address them before merging. labels May 31, 2016
@rphmeier rphmeier added A8-looksgood 🦄 Pull request is reviewed well. and removed A0-pleasereview 🤓 Pull request needs code review. labels Jun 1, 2016
@gavofyork gavofyork merged commit 7ad9c73 into master Jun 2, 2016
@gavofyork gavofyork deleted the ipc-fixes-2 branch June 2, 2016 09:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants