PathSegmentsMut has no finish method like UrlQuery
@nox is already working on this.
Since Jul 18, 2019.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 406
- PR merge metrics
- No merged PRs in 30d
Description
When building a URL, it would be convenient to be able to
finishmutating path segments like one currently can for query pairs.// will NOT compile let mut url = Url::parse("..."); url .path_segments_mut().unwrap() // ... .query_pairs_mut() // ... .finish() // ...Instead the query pairs must be mutated first, since this 'sub builder' can be
finished, returning aUrl. Which (though slightly counter-intuitive) is fine, it's just a slightly jarring restriction.It also means the mutable variable is necessary; if it behaved like
query_pairs_mutthen this could all be on one chain which could be passed directly (or via an immutable variable) into aClientmethod.
From https://github.com/seanmonstar/reqwest/issues/150
/cc @OJFord
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.