mirror of
https://github.com/storytold/figcraft.git
synced 2026-11-17 23:58:24 +00:00
fix(format): keep legacy ZIP options only for remaining test fixture
This commit is contained in:
1 parent
931a1467b2
commit
5ee60ec708
1 file changed
+3
-1
@@ -47,6 +47,7 @@ pub use craft_figcraft_format::{
|
||||
MAX_VERSION_INDEX, MAX_VERSION_NAME, MAX_VERSIONS, ReadBudget, VERSION, VersionEntry as NativeVersionEntry, VersionIndex as NativeVersionIndex,
|
||||
clip, document_limit, is_valid_version_id,
|
||||
};
|
||||
#[cfg(test)]
|
||||
const JSON_LEVEL: i64 = 3;
|
||||
/// The export warning for colour calculations that resolve to nothing (an operand missing, or more
|
||||
/// than 32 variables to read), shared by the Penpot and `.fig` exports.
|
||||
@@ -411,7 +412,8 @@ pub(crate) fn io_err(e: impl std::fmt::Display) -> FormatError {
|
||||
FormatError::Io(e.to_string())
|
||||
}
|
||||
|
||||
/// JSON compression for Penpot and external ZIP exporters.
|
||||
/// JSON compression for legacy Penpot test fixtures.
|
||||
#[cfg(test)]
|
||||
pub(crate) fn json_options() -> zip::write::SimpleFileOptions {
|
||||
zip::write::SimpleFileOptions::default().compression_method(zip::CompressionMethod::Deflated).compression_level(Some(JSON_LEVEL))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user