Skip to content
This repository has been archived by the owner on Feb 14, 2021. It is now read-only.

Panic message opt-in #42

Merged
merged 4 commits into from
Nov 16, 2017
Merged

Panic message opt-in #42

merged 4 commits into from
Nov 16, 2017

Conversation

pepyakin
Copy link
Contributor

With this change, user can make a choice whether she wants to pay for all formatting machinery.

src/panic.rs Outdated
}
#![cfg(not(feature = "std"))]

use {Vec};
Copy link
Collaborator

Choose a reason for hiding this comment

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

use Vec?

src/panic.rs Outdated
#[cfg(not(feature = "panic_with_msg"))]
let message = ::alloc::String::new();

let mut payload = Vec::new();
Copy link
Collaborator

@NikVolf NikVolf Nov 16, 2017

Choose a reason for hiding this comment

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

could be Vec::with_capacity(message.as_bytes().len() + file.as_bytes().len() + 8)

@NikVolf NikVolf merged commit d7b43ee into master Nov 16, 2017
@NikVolf NikVolf deleted the panic-optional-msg branch November 16, 2017 17:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants