ft: deserialization

This commit is contained in:
djaidjai committed 2026-04-26 23:49:03 +02:00
1 parent 430bdf63bc
commit 076bcc7155
5 files changed
+55 -27

No files matched your search

+4 -8
View File
@@ -41,11 +41,9 @@ impl Default for RawCamera {
}
}
impl TryFrom<RawCamera> for Camera {
type Error = String;
fn try_from(raw: RawCamera) -> Result<Self, Self::Error> {
let c = Camera::new_full(
impl From<RawCamera> for Camera {
fn from(raw: RawCamera) -> Self {
Camera::new_full(
raw.image_width,
raw.image_height,
raw.anti_alias_rate,
@@ -54,8 +52,6 @@ impl TryFrom<RawCamera> for Camera {
raw.look_from,
raw.look_at,
raw.vup,
);
Ok(c)
)
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.