Skip to content

Commit 007528c

Browse files
committed
No deriving default on enums
1 parent 7ceeeeb commit 007528c

File tree

1 file changed

+14
-4
lines changed
  • rtp/src/extension/video_orientation_extension

1 file changed

+14
-4
lines changed

rtp/src/extension/video_orientation_extension/mod.rs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,14 @@ pub struct VideoOrientationExtension {
4141
pub rotation: VideoRotation,
4242
}
4343

44-
#[derive(PartialEq, Eq, Debug, Default, Copy, Clone)]
44+
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
4545
pub enum CameraDirection {
46-
#[default]
4746
Front = 0,
4847
Back = 1,
4948
}
5049

51-
#[derive(PartialEq, Eq, Debug, Default, Copy, Clone)]
50+
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
5251
pub enum VideoRotation {
53-
#[default]
5452
Degree0 = 0,
5553
Degree90 = 1,
5654
Degree180 = 2,
@@ -130,3 +128,15 @@ impl TryFrom<u8> for VideoRotation {
130128
}
131129
}
132130
}
131+
132+
impl Default for CameraDirection {
133+
fn default() -> Self {
134+
CameraDirection::Front
135+
}
136+
}
137+
138+
impl Default for VideoRotation {
139+
fn default() -> Self {
140+
VideoRotation::Degree0
141+
}
142+
}

0 commit comments

Comments
 (0)