aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util/forgejo_url.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/util/forgejo_url.rs')
-rw-r--r--crates/shirabe/src/util/forgejo_url.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/shirabe/src/util/forgejo_url.rs b/crates/shirabe/src/util/forgejo_url.rs
index ce5a8948..639426e1 100644
--- a/crates/shirabe/src/util/forgejo_url.rs
+++ b/crates/shirabe/src/util/forgejo_url.rs
@@ -27,10 +27,10 @@ impl ForgejoUrl {
pub fn create(repo_url: &str) -> anyhow::Result<Self> {
match Self::try_from(Some(repo_url)) {
Some(url) => Ok(url),
- None => Err(InvalidArgumentException {
- message: format!("This is not a valid Forgejo URL: {}", repo_url),
- code: 0,
- }
+ None => Err(InvalidArgumentException::new(format!(
+ "This is not a valid Forgejo URL: {}",
+ repo_url
+ ))
.into()),
}
}