-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc555d6
commit 9cef742
Showing
4 changed files
with
35 additions
and
11 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use std::fmt::Debug; | ||
|
||
use iceportal::errors::ICEPortalError; | ||
|
||
pub enum ICEPortalRichPresenseError { | ||
ICEPortalError(ICEPortalError) | ||
} | ||
|
||
impl From<ICEPortalError> for ICEPortalRichPresenseError { | ||
fn from(e: ICEPortalError) -> Self { | ||
Self::ICEPortalError(e) | ||
} | ||
} | ||
|
||
impl Debug for ICEPortalRichPresenseError { | ||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||
match self { | ||
Self::ICEPortalError(_) => | ||
write!(f, "Error while connecting to ICE portal: Please check if you are connected to the Bahn WiFi") | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters