diff --git a/fuzz/fuzz_targets/fuzz_write.rs b/fuzz/fuzz_targets/fuzz_write.rs index f3e3cb3c..0a377e45 100755 --- a/fuzz/fuzz_targets/fuzz_write.rs +++ b/fuzz/fuzz_targets/fuzz_write.rs @@ -63,18 +63,10 @@ impl <'k> Debug for FileOperation<'k> { options, self.path, target.to_owned())) }, BasicFileOperation::ShallowCopy(base) => { - f.write_fmt(format_args!("let path = {:?};\n\ - {{\n\ - {:?} - }}\n\ - writer.shallow_copy_file_from_path(path, {:?})?;\n", base.path, base, self.path)) + f.write_fmt(format_args!("{:?}writer.shallow_copy_file_from_path(path, {:?})?;\n", base, self.path)) }, BasicFileOperation::DeepCopy(base) => { - f.write_fmt(format_args!("let path = {:?};\n\ - {{\n\ - {:?} - }}\n\ - writer.deep_copy_file_from_path(path, {:?})?;\n", base.path, base, self.path)) + f.write_fmt(format_args!("{:?}writer.deep_copy_file_from_path(path, {:?})?;\n", base, self.path)) }, BasicFileOperation::MergeWithOtherFile {operations} => { f.write_str("let sub_writer = {\n\ diff --git a/src/write.rs b/src/write.rs index e229ffb7..ee09abcf 100644 --- a/src/write.rs +++ b/src/write.rs @@ -260,12 +260,19 @@ pub type SimpleFileOptions = FileOptions<'static, ()>; /// Adds Extra Data and Central Extra Data. It does not implement copy. pub type FullFileOptions<'k> = FileOptions<'k, ExtendedFileOptions>; /// The Extension for Extra Data and Central Extra Data -#[derive(Clone, Debug, Default)] +#[derive(Clone, Default)] pub struct ExtendedFileOptions { extra_data: Arc>, central_extra_data: Arc>, } +impl Debug for ExtendedFileOptions { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> { + f.write_fmt(format_args!("ExtendedFileptions {{extra_data: vec!{:?}.into(), central_extra_data: vec!{:?}.into()}}", + self.extra_data, self.central_extra_data)) + } +} + #[cfg(fuzzing)] impl<'a> arbitrary::Arbitrary<'a> for FileOptions<'a, ExtendedFileOptions> { fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result {