Skip to content

Commit

Permalink
Uses Error::Unknow instead of panic
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpii committed Nov 6, 2024
1 parent 43384b8 commit 2a30250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/connection/_copy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ impl Connection {
-1 => self.error(),
0 => Err(crate::errors::Error::Backend("Full buffers".to_string())),
1 => Ok(()),
_ => unreachable!(),
_ => Err(crate::errors::Error::Unknow),
}
}

Expand All @@ -50,7 +50,7 @@ impl Connection {
-1 => self.error(),
0 => Err(crate::errors::Error::Backend("Full buffers".to_string())),
1 => Ok(()),
_ => unreachable!(),
_ => Err(crate::errors::Error::Unknow),
}
}

Expand Down

0 comments on commit 2a30250

Please sign in to comment.