Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile From<_> impls for -std enums even if they're not total #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/codec/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -965,6 +965,8 @@ impl From<AVCodecID> for Id {
AV_CODEC_ID_FITS => Id::FITS,
AV_CODEC_ID_GREMLIN_DPCM => Id::GREMLIN_DPCM,
AV_CODEC_ID_DOLBY_E => Id::DOLBY_E,

_ => unimplemented!(),
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/codec/packet/side_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ impl From<AVPacketSideDataType> for Type {

AV_PKT_DATA_CONTENT_LIGHT_LEVEL => Type::ContentLightLevel,
AV_PKT_DATA_A53_CC => Type::A53CC,

_ => unimplemented!(),
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions src/util/color/space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ impl Space {

impl From<AVColorSpace> for Space {
fn from(value: AVColorSpace) -> Self {
#[allow(unreachable_patterns)]
match value {
AVCOL_SPC_RGB => Space::RGB,
AVCOL_SPC_BT709 => Space::BT709,
Expand All @@ -53,6 +54,8 @@ impl From<AVColorSpace> for Space {
AVCOL_SPC_CHROMA_DERIVED_NCL => Space::ChromaDerivedNCL,
AVCOL_SPC_CHROMA_DERIVED_CL => Space::ChromaDerivedCL,
AVCOL_SPC_ICTCP => Space::ICTCP,

_ => unimplemented!(),
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/util/format/pixel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,8 @@ impl From<AVPixelFormat> for Pixel {
AV_PIX_FMT_GBRAPF32BE => Pixel::GBRAPF32BE,
AV_PIX_FMT_GBRAPF32LE => Pixel::GBRAPF32LE,
AV_PIX_FMT_DRM_PRIME => Pixel::DRM_PRIME,

_ => unimplemented!(),
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/util/frame/side_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ impl From<AVFrameSideDataType> for Type {

AV_FRAME_DATA_CONTENT_LIGHT_LEVEL => Type::ContentLightLevel,
AV_FRAME_DATA_ICC_PROFILE => Type::IccProfile,

_ => unimplemented!(),
}
}
}
Expand Down