v2.0.0
We are very excited to release v2.0.0. This is the second major release of Ada for Rust.
Breaking Changes
- We updated the function signatures to use
Option<&str>
instead of&str
for removing certain attributes from the URL.
let mut url = Url::parse("https://ada-url.com").expect("URL should be valid");
url.set_pathname(Some("/playground"));
- We changed the error signature to avoid unnecessary allocation.
New Features
URLComponents struct
We exposed the URL components under components()
function. If you want to avoid allocating strings, you should definitely use this to construct the rest using the href
attribute.
let url = Url::parse("https://ada-url.com").expect("URL should be valid");
let components = url.components()
// You can now call components.host_start
New no-std
feature
If you want to avoid using the standard library of Rust, you can now use Ada without std
.
ada_url = { version = "2", default-features = false }
Changelog
- Add
UrlComponents
struct by @anonrig in #33 - doc: add comments for setter functions by @anonrig in #34
- Simplify from ada_url_components. by @ttsugriy in #35
- docs: fix by @KSXGitHub in #38
- feat: fallible setters should return result by @KSXGitHub in #36
- feat: error type without allocation by @KSXGitHub in #37
- refactor: prepare for
no-std
by @anonrig in #39 - Update Ada to v2.6.5 and update API signatures by @anonrig in #40
- docs: remove an unnecessary and incorrect guide by @KSXGitHub in #44
- Adding libcpp tests by @lemire in #45
- feat: no-std by @KSXGitHub in #42
New Contributors
Full Changelog: v1.4.3...v2.0.0