-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7b839c6
commit 9a1119c
Showing
8 changed files
with
105 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use serde::{Deserialize, Serialize}; | ||
|
||
use crate::tools::report_creator::ReportCreator; | ||
|
||
#[derive(Serialize, Deserialize, Default)] | ||
#[serde(rename_all = "camelCase")] | ||
pub struct CodeReportJson { | ||
#[serde(default)] | ||
pub path: String, | ||
|
||
#[serde(default)] | ||
pub size: usize, | ||
|
||
#[serde(default)] | ||
pub has_allocator: bool, | ||
|
||
#[serde(default)] | ||
pub has_panic: String, | ||
} | ||
|
||
impl CodeReportJson { | ||
pub fn new(report: &ReportCreator, size: usize) -> CodeReportJson { | ||
CodeReportJson { | ||
path: report.path.clone(), | ||
size, | ||
has_allocator: report.has_allocator, | ||
has_panic: report.has_panic.clone(), | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
pub const WITH_MESSAGE: &str = "with message"; | ||
pub const WITHOUT_MESSAGE: &str = "without message"; | ||
|
||
pub struct ReportCreator { | ||
pub path: String, | ||
pub has_allocator: bool, | ||
pub has_panic: String, | ||
} | ||
|
||
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