Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
SegaraRai committed May 7, 2024
1 parent d8db910 commit 88a5b60
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/capture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,10 @@ pub trait GraphicsCaptureApiHandler: Sized {
Self::new(settings.flags).map_err(GraphicsCaptureApiError::NewHandlerError)?,
));

let item = match settings.item.try_into() {
Ok(item) => item,
Err(_) => return Err(GraphicsCaptureApiError::ItemConvertFailed),
};
let item = settings
.item
.try_into()
.map_err(|_| GraphicsCaptureApiError::ItemConvertFailed)?;

let mut capture = GraphicsCaptureApi::new(
item,
Expand Down Expand Up @@ -371,7 +371,9 @@ pub trait GraphicsCaptureApiHandler: Sized {
Self::new(settings.flags).map_err(GraphicsCaptureApiError::NewHandlerError)?,
));

let item = settings.item.try_into()
let item = settings
.item
.try_into()
.map_err(|_| GraphicsCaptureApiError::ItemConvertFailed)?;

let mut capture = GraphicsCaptureApi::new(
Expand Down

0 comments on commit 88a5b60

Please sign in to comment.