Closed Techie-Pi closed 1 year ago
Apologies, I would have removed the cam function in the PR but there were CI issues and I guess it went through accidentally. The function is used for when both cameras are taking a picture at the same time. Since this isn't implemented yet it can removed for now (whether a small addition to this PR or a small commit by an author to the main branch).
Since this isn't implemented yet it can removed for now (whether a small addition to this PR or a small commit by an author to the main branch).
Alright, I'll remove the function then. No problem
The last commits were done to fix the CI, if this PR isn't merged I'll make them a separate PR
Hmmm CI fails to compile cargo-3ds
with latest nightly
Hmmm CI fails to compile
cargo-3ds
with latest nightly
The CI on latest nightly failing shouldn't prevent merge, it's just there as a sort of canary to tell us whether stuff works on latest nightly. I think this instance is some kind of issue with the CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
flag we use, maybe it got destabilized or something.
Right now, most calls to
ctru_sys
functions look like this:This PR adds the
LibCtruResult
struct (though the name can be changed), which implements theTry
trait to allow the usage of the?
operator. The example above now looks like this:This makes the code much more simpler, and both do exactly the same thing as it can be seen here.
This could be implemented in a macro, but putting the
i32
returned from thectru_sys
functions into a struct defined by the crate allows the future implementation of further abstractions around the raw errors provided byctru_sys
to cover cases that can't be covered right now.CI is failing due to this cam function not being used (maybe it was meant to be public?, @SteveCookTU)