diff options
author | Cyborus <cyborus@cyborus.xyz> | 2024-11-05 19:41:54 +0100 |
---|---|---|
committer | Cyborus <cyborus@cyborus.xyz> | 2024-11-05 19:41:54 +0100 |
commit | cf17761c6e3fbf9ba7b2af02ce614c90eabf1dea (patch) | |
tree | fd057a212976090af976876253f18352c4e25e37 | |
parent | Merge pull request 'move `whoami` and `version` into separate modules' (#137)... (diff) | |
download | forgejo-cli-cf17761c6e3fbf9ba7b2af02ce614c90eabf1dea.tar.xz forgejo-cli-cf17761c6e3fbf9ba7b2af02ce614c90eabf1dea.zip |
fix: incorrect string slicing in ssh url parsing
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index b388fab..a9c6b36 100644 --- a/src/main.rs +++ b/src/main.rs @@ -149,7 +149,7 @@ fn ssh_url_parse(s: &str) -> Result<url::Url, url::ParseError> { let auth_end = s.find("@").unwrap_or(0); new_s.push_str(&s[..auth_end]); - new_s.push_str(&s[..auth_end].replacen(":", "/", 1)); + new_s.push_str(&s[auth_end..].replacen(":", "/", 1)); url::Url::parse(&new_s) }) } |