Skip to content

Commit

Permalink
removing temp doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin-valerio committed Sep 2, 2024
1 parent 71bbcc5 commit 39cc1f3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
9 changes: 5 additions & 4 deletions src/cli/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,11 @@ impl Configuration {
}
}

pub fn save_as_toml(&self, to: &str) {
let toml_str = toml::to_string(self).unwrap();
let mut file = File::create(to).unwrap();
file.write_all(toml_str.as_bytes()).unwrap();
pub fn save_as_toml(&self, to: &str) -> anyhow::Result<()> {
let toml_str = toml::to_string(self)?;
let mut file = File::create(to)?;
file.write_all(toml_str.as_bytes())?;
Ok(())
}

pub fn parse_balance(value: Option<String>) -> Option<BalanceOf<Runtime>> {
Expand Down
10 changes: 4 additions & 6 deletions src/cli/ziggy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,8 @@ impl ZiggyConfig {
let allowlist = PhinkFiles::new(self.config.fuzz_output.clone().unwrap_or_default())
.path(AllowListPath);

command_builder = command_builder.env(
"AFL_LLVM_ALLOWLIST",
allowlist.canonicalize()?.to_str().unwrap(),
);
command_builder =
command_builder.env("AFL_LLVM_ALLOWLIST", allowlist.canonicalize()?.to_str());
}
Ok(())
}
Expand Down Expand Up @@ -198,7 +196,7 @@ impl ZiggyConfig {
vec![],
vec![(
"PHINK_START_FUZZING_WITH_CONFIG".into(),
serde_json::to_string(self).unwrap(),
serde_json::to_string(self)?,
)],
)?;
Ok(())
Expand All @@ -218,7 +216,7 @@ impl ZiggyConfig {
vec![],
vec![(
"PHINK_START_FUZZING_WITH_CONFIG".into(),
serde_json::to_string(self).unwrap(),
serde_json::to_string(self)?,
)],
)?;
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion tests/shared/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ where
{
try_cleanup_instrumented(config);
try_cleanup_fuzzoutput(config);
config.save_as_toml(DEFAULT_TEST_PHINK_TOML);
config.save_as_toml(DEFAULT_TEST_PHINK_TOML)?;

// Executing the actual test
let test_result = executed_test();
Expand Down

0 comments on commit 39cc1f3

Please sign in to comment.