-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wasm-extractor - fix report parameters
- Loading branch information
1 parent
390d18d
commit 265a9fa
Showing
4 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,28 @@ | ||
pub const WITH_MESSAGE: &str = "with message"; | ||
pub const WITHOUT_MESSAGE: &str = "without message"; | ||
use std::fmt::Display; | ||
|
||
#[derive(Default)] | ||
pub enum PanicMessage { | ||
#[default] | ||
None, | ||
WithoutMessage, | ||
WithMessage, | ||
} | ||
|
||
impl Display for PanicMessage { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
let panic_status = match self { | ||
PanicMessage::None => "None", | ||
PanicMessage::WithoutMessage => "without message", | ||
PanicMessage::WithMessage => "with message", | ||
}; | ||
write!(f, "{}", panic_status) | ||
} | ||
} | ||
|
||
pub struct ReportCreator { | ||
pub path: String, | ||
pub has_allocator: bool, | ||
pub has_panic: String, | ||
pub has_panic: PanicMessage, | ||
} | ||
|
||
impl ReportCreator {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters