aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/io/base_io.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/io/base_io.rs')
-rw-r--r--crates/shirabe/src/io/base_io.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/crates/shirabe/src/io/base_io.rs b/crates/shirabe/src/io/base_io.rs
index 5dd7682f..52ef9a82 100644
--- a/crates/shirabe/src/io/base_io.rs
+++ b/crates/shirabe/src/io/base_io.rs
@@ -145,13 +145,11 @@ pub trait BaseIO: IOInterface {
}
if !Preg::is_match(php_regex!(r"{^[.A-Za-z0-9_]+$}"), &token_str) {
- return Err(anyhow::anyhow!(UnexpectedValueException {
- message: format!(
- "Your github oauth token for {} contains invalid characters: \"{}\"",
- domain, token_str
- ),
- code: 0,
- }));
+ return Err(UnexpectedValueException::new(format!(
+ "Your github oauth token for {} contains invalid characters: \"{}\"",
+ domain, token_str
+ ))
+ .into());
}
self.check_and_set_authentication(
domain,