Skip to content

Commit

Permalink
now?
Browse files Browse the repository at this point in the history
  • Loading branch information
ethteck committed Aug 17, 2024
1 parent 9ab3d07 commit 89102ae
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 91 deletions.
126 changes: 36 additions & 90 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ crate-type = ["lib", "staticlib", "cdylib"]

[dependencies]
crc32fast = "1.4.2"
pyo3 = { version="0.20.0, features = ["extension-module"], optional = true }
pyo3 = { version="0.20.0", features = ["extension-module"], optional = true }
thiserror = "1.0"
vpk0 = "0.8.2"

Expand Down
5 changes: 5 additions & 0 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ use pyo3::prelude::*;

/* This needs to be in sync with the C equivalent at `crunch64/error.h` */
#[cfg_attr(feature = "c_bindings", repr(u32))]
#[cfg_attr(feature = "c_bindings", derive(Copy))]
#[derive(Clone, Debug, Error, PartialEq, Eq, Hash)]
pub enum Crunch64Error {
#[error("Not an error")]
Expand All @@ -37,8 +38,12 @@ pub enum Crunch64Error {
NullPointer,
#[error("Invalid compression level")]
InvalidCompressionLevel,
#[cfg(not(feature = "c_bindings"))]
#[error("Failed to handle vpk0 data: {0}")]
Vpk0(String),
#[cfg(feature = "c_bindings")]
#[error("Failed to handle vpk0 data")]
Vpk0,
}

#[cfg(feature = "python_bindings")]
Expand Down

0 comments on commit 89102ae

Please sign in to comment.