Skip to content

Commit

Permalink
fix two -sys in deps tree
Browse files Browse the repository at this point in the history
  • Loading branch information
boozook committed Sep 28, 2023
1 parent 7aa9f85 commit 7fa10fb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

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

10 changes: 9 additions & 1 deletion api/sound/src/sample.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,15 @@ impl<Api: api::Api> Sample<Api> {
pub fn new_for_file_with<P: AsRef<Path>>(api: Api, path: P) -> Result<Self, ApiError> {
let size = match fs::metadata(path) {
Ok(stats) => stats.size,
Err(err) => return Err(ApiError::from_err(err)),
Err(err) => {
return match err {
fs::error::ApiError::Api(err) => Err(ApiError::Api(err.into())),
fs::error::ApiError::Utf8(err) => Err(ApiError::Utf8(err)),
fs::error::ApiError::FromUtf8(err) => Err(ApiError::FromUtf8(err)),
fs::error::ApiError::CStr(err) => Err(ApiError::CStr(err)),
fs::error::ApiError::NullPtr(_) => Err(ApiError::NullPtr(sys::error::NullPtrError)),
}
}, // Err(err) => return Err(ApiError::from_err(err)),
};

Self::new_with_size_with(api, size as _).map_err(Into::into)
Expand Down
2 changes: 1 addition & 1 deletion api/sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "playdate-sys"
version = "0.2.0"
version = "0.2.1"
build = "src/build.rs"
readme = "README.md"
description = "Low-level Playdate API bindings"
Expand Down
1 change: 0 additions & 1 deletion api/sys/src/sys/error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ pub enum Error<T = ()> {
NullPtrCtx(null::ctx::NullPtrError),
}

// impl<T: CoreError> fmt::Display for Error<T> {
impl<T: fmt::Display> fmt::Display for Error<T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match &self {
Expand Down

0 comments on commit 7fa10fb

Please sign in to comment.