Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Panaetius committed Dec 17, 2024
1 parent 26b1e4f commit 4e61c73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/httpclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,8 @@ impl Client {
(?<uinamespace>/v2/projects/)(?<uins>[^/]+)/(?<uiname>.+) # /v2/projects/<namespace>/<slug> (ui)").unwrap();
let captures = project_path_regex.captures(url.path()).unwrap();
let path = if captures.name("uiproj").is_some() {
&format!(
"/api/data/projects/{}",
captures.name("uiid").unwrap().as_str()
)
let proj_id = captures.name("uiid").unwrap().as_str();
format!("/api/data/projects/{}", proj_id)
} else {
return Err(Error::ProjectUrlParse {
reason: format!("Url {} did not match project URL pattern", url),
Expand Down

0 comments on commit 4e61c73

Please sign in to comment.