egui: replace erroneous `.unwrap()` with try expression

This commit is contained in:
Mikolaj Wielgus 2024-09-17 00:38:05 +02:00
parent a2b8550c12
commit be03f190a0
1 changed files with 1 additions and 1 deletions

View File

@ -19,6 +19,6 @@ impl<'a> FileReceiver<'a> {
#[cfg(target_arch = "wasm32")] #[cfg(target_arch = "wasm32")]
pub fn try_recv(&mut self) -> Result<Cursor<Vec<u8>>, TryRecvError> { pub fn try_recv(&mut self) -> Result<Cursor<Vec<u8>>, TryRecvError> {
Ok(Cursor::new(self.receiver.try_recv().unwrap().into())) Ok(Cursor::new(self.receiver.try_recv()?.into()))
} }
} }