Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
taavit committed Apr 28, 2023
1 parent b2d214d commit 0538735
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ impl<R: Read> Decoder<R> {
}

let frame = self.frame.as_ref().unwrap();
let preference = Self::select_worker(&frame, PreferWorkerKind::Multithreaded);
let preference = Self::select_worker(frame, PreferWorkerKind::Multithreaded);

worker_scope.get_or_init_worker(preference, |worker| {
self.decode_planes(worker, planes, planes_u16)
Expand Down
2 changes: 1 addition & 1 deletion src/worker/multithreaded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl MpscWorker {
) -> Result<()> {
// if there is no worker thread for this component yet, start one
let component = row_data.index;
if let None = self.senders[component] {
if self.senders[component].is_none() {
let sender = spawn_worker(component)?;
self.senders[component] = Some(sender);
}
Expand Down

0 comments on commit 0538735

Please sign in to comment.