forked from Deuxfleurs/tricot
better split
This commit is contained in:
parent
8d47bef9d4
commit
0e6e60d35a
1 changed files with 5 additions and 2 deletions
|
@ -98,8 +98,11 @@ fn parse_tricot_tag(
|
|||
return None;
|
||||
}
|
||||
|
||||
let (host, path_prefix) = match splits[1].split_once('/') {
|
||||
Some((h, p)) => (h, Some(format!("/{}", p))),
|
||||
let (host, path_prefix) = match splits[1].find('/') {
|
||||
Some(i) => {
|
||||
let (host, pp) = splits[1].split_at(i);
|
||||
(host, Some(pp.to_string()))
|
||||
},
|
||||
None => (splits[1], None),
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue