We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi guys,
is it possible to use Default trait instead of writing None for nullable values.
Default
None
// current solutions set: StreamsSetInput { id: None, user_id: None, stream_id: None, is_online: None, live_ms: Some(stream.live_ms.unwrap().to_string()), frames: Some(stream.frames.unwrap().to_string()), send_bytes: Some(stream.send_bytes.unwrap().to_string()), recv_bytes: Some(stream.recv_bytes.unwrap().to_string()), video_codec: Some(stream.video.as_ref().unwrap().codec.clone().unwrap()), video_profile: Some( stream.video.as_ref().unwrap().profile.clone().unwrap(), ), video_level: Some(stream.video.as_ref().unwrap().level.clone().unwrap()), video_width: Some(stream.video.as_ref().unwrap().width.unwrap().into()), video_height: Some(stream.video.as_ref().unwrap().height.unwrap().into()), audio_codec: Some(stream.audio.as_ref().unwrap().codec.clone()), audio_sample_rate: Some(stream.audio.as_ref().unwrap().sample_rate.into()), audio_channel: Some(stream.audio.as_ref().unwrap().channel.into()), audio_profile: Some(stream.audio.as_ref().unwrap().profile.clone()), created_at: None, updated_at: None, }, // expected solutions set: StreamsSetInput { live_ms: Some(stream.live_ms.unwrap().to_string()), frames: Some(stream.frames.unwrap().to_string()), send_bytes: Some(stream.send_bytes.unwrap().to_string()), recv_bytes: Some(stream.recv_bytes.unwrap().to_string()), video_codec: Some(stream.video.as_ref().unwrap().codec.clone().unwrap()), video_profile: Some( stream.video.as_ref().unwrap().profile.clone().unwrap(), ), video_level: Some(stream.video.as_ref().unwrap().level.clone().unwrap()), video_width: Some(stream.video.as_ref().unwrap().width.unwrap().into()), video_height: Some(stream.video.as_ref().unwrap().height.unwrap().into()), audio_codec: Some(stream.audio.as_ref().unwrap().codec.clone()), audio_sample_rate: Some(stream.audio.as_ref().unwrap().sample_rate.into()), audio_channel: Some(stream.audio.as_ref().unwrap().channel.into()), audio_profile: Some(stream.audio.as_ref().unwrap().profile.clone()), ..Default::default() },
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi guys,
is it possible to use
Default
trait instead of writingNone
for nullable values.The text was updated successfully, but these errors were encountered: