Skip to content

Commit

Permalink
use .is instead of downcast_ref to check for PathNotFoundError
Browse files Browse the repository at this point in the history
  • Loading branch information
syphar committed Nov 22, 2023
1 parent b859e78 commit 5522add
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/web/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pub(crate) async fn source_browser_handler(
{
Ok(blob) => Some(blob),
Err(err) => {
if err.downcast_ref::<PathNotFoundError>().is_some() {
if err.is::<PathNotFoundError>() {
None
} else {
return Err(err.into());
Expand Down

0 comments on commit 5522add

Please sign in to comment.