style: run cargo fmt

This commit is contained in:
meh
2021-03-20 19:35:40 +01:00
parent 0469471ef6
commit 40dc584f94
3 changed files with 11 additions and 5 deletions
+7 -1
View File
@@ -23,7 +23,13 @@ impl Drop for Destructor {
match self.mode {
Mode::Input => avformat_close_input(&mut self.ptr),
Mode::Output => {
if (*self.ptr).flags & AVFMT_NOFILE != 0 && !(*(*self.ptr).pb).av_class.is_null() {
if (*self.ptr).flags & AVFMT_NOFILE != 0
&& (*self.ptr)
.pb
.as_ref()
.map(|pb| !(*pb).av_class.is_null())
.unwrap_or(false)
{
avio_close((*self.ptr).pb);
}
+2 -2
View File
@@ -7,8 +7,8 @@ pub struct Input {
ptr: *mut AVInputFormat,
}
unsafe impl Send for Input { }
unsafe impl Sync for Input { }
unsafe impl Send for Input {}
unsafe impl Sync for Input {}
impl Input {
pub unsafe fn wrap(ptr: *mut AVInputFormat) -> Self {
+2 -2
View File
@@ -13,8 +13,8 @@ pub struct Output {
ptr: *mut AVOutputFormat,
}
unsafe impl Send for Output { }
unsafe impl Sync for Output { }
unsafe impl Send for Output {}
unsafe impl Sync for Output {}
impl Output {
pub unsafe fn wrap(ptr: *mut AVOutputFormat) -> Self {