Skip to content

Releases: yescallop/fluent-uri-rs

fluent-uri v0.2.0

30 Jul 17:24
Compare
Choose a tag to compare

Highlights

  • Added support for building, resolving and normalizing URI references.
  • Renamed Uri to UriRef because it represents a URI reference, not a URI (see #19).
  • Added a type parameter on EStr which represents an encoder determining which characters must be percent-encoded, along with 7 encoders: Userinfo, RegName, Port, Path, Query, Fragment, and Data.
  • Added EString which is a percent-encoded, growable string.
  • Dropped all unsafe code.

Other changes

Added

  • Implemented appropriate traits on all types.
  • Added Scheme::{new, new_or_panic} associated functions.
  • Added Authority::{port_to_u16, socket_addrs} utility methods.
  • Added Uri::has_{scheme, authority, query, fragment} and Authority::has_{userinfo, port} methods.
  • Added {EStr, Authority}::EMPTY constants.
  • Added EStr::{len, is_empty, rsplit_once} methods.
  • Added a type parameter on ParseError which represents the input type and ParseError::{into, strip}_input methods.
  • Added net and serde crate features.

Removed

  • Removed in-place mutable variant of URI reference (Uri<&mut [u8]>) and related APIs.
  • Removed ParseErrorKind enum and ParseError::{index, kind} methods.
  • Removed ipv_future and rfc6874bis crate features.
  • Removed Uri<&str>::dup method as UriRef<&str> is now Copy.
  • Removed Scheme::{to_lowercase, eq_lowercase} methods in favor of the new case-insensitive PartialEq implementation on Scheme.

Changed

  • Merged Uri::parse and Uri::parse_from into UriRef::parse with generics.
  • Authority is now directly borrowed from the string instead of the UriRef.
  • Removed Uri::{is_relative, is_absolute} in favor of the newly added UriRef::is_uri.
  • Removed Host, renamed HostData to Host, changed Authority::host to return &str, and added Authority::host_parsed which returns Host.
  • Changed Host: Ipv6 is now a tuple variant with a single Ipv6Addr field, and IpvFuture is now a non-exhaustive unit variant.
  • Removed the dedicated Path type, moved the utility methods Path::{is_absolute, is_rootless, segments} onto EStr<Path>, and changed UriRef::path to return &EStr<Path>.
  • Changed Authority::port to return Option<&EStr<Port>>.
  • Changed UriRef<String>::borrow to return UriRef<&str>.
  • Changed EStr::new to return Option instead and added EStr::new_or_panic.
  • Changed module structure.
  • Extracted a code pattern into the borrow-or-share crate.
  • Bumped MSRV to 1.65 (was 1.59).
  • Reworked documentation.

v0.1.4

11 Mar 12:11
Compare
Choose a tag to compare

Change log:

  • Added no_std support.
  • Implemented common traits on some types.
  • Updated comments.

v0.1.3

17 May 08:06
Compare
Choose a tag to compare

This is the de facto first release of fluent-uri.

Change log:

  • Introduced generics in Uri.
  • u32 indexes instead of slices are stored internally.
  • Multiple bugs found when fuzzing the crate against other parsers are now fixed.
  • Removed a bunch of unnecessary APIs to ensure a minimal and future-proof crate.
  • Added two feature flags for enabling the parsing of IPvFuture and IPv6 scoped addresses.
  • Refined documentations.

v0.1.2

16 Apr 06:15
Compare
Choose a tag to compare
  • Fix IPv6 address parsing: inputs such as :::4.4.4.4 and ::ffff4.4.4.4 are no longer accepted.

v0.1.1

14 Apr 04:09
Compare
Choose a tag to compare

Fix incorrect logic in functions encode_with, decode_with and decode_with_unchecked that causes incorrect results (but no UB).

v0.1.0

09 Apr 12:28
Compare
Choose a tag to compare

This is the first release of fluent-uri.