mirror of
https://github.com/Drop-OSS/drop-app-kt.git
synced 2026-02-04 06:51:18 +01:00
chore(errors): Convert match statement to map_err
This commit is contained in:
@@ -84,10 +84,7 @@ pub fn fetch_user() -> Result<User, RemoteAccessError> {
|
||||
return Err(RemoteAccessError::InvalidResponse(err));
|
||||
}
|
||||
|
||||
match response.json::<User>() {
|
||||
Ok(data) => Ok(data),
|
||||
Err(e) => Err(e.into()),
|
||||
}
|
||||
response.json::<User>().map_err(|e| e.into())
|
||||
}
|
||||
|
||||
fn recieve_handshake_logic(app: &AppHandle, path: String) -> Result<(), RemoteAccessError> {
|
||||
|
||||
Reference in New Issue
Block a user