Skip to content

Commit 86e15b6

Browse files
committed
Clean up
1 parent 3386b4e commit 86e15b6

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "fluent-uri"
33
version = "0.1.3"
44
authors = ["Scallop Ye <[email protected]>"]
55
edition = "2021"
6-
rust-version = "1.69.0"
6+
rust-version = "1.63.0"
77
description = "A generic URI parser that strictly adheres to IETF RFC 3986."
88
documentation = "https://docs.rs/fluent-uri"
99
repository = "https://github.com/yescallop/fluent-uri-rs"

src/internal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ pub union RawHostData {
240240
pub ipv6: Ipv6Data,
241241
#[cfg(feature = "ipv_future")]
242242
pub ipv_future_dot_i: u32,
243-
pub reg_name: (),
243+
pub none: (),
244244
}
245245

246246
#[derive(Clone, Copy)]

src/lib.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
//!
1111
//! # Feature flags
1212
//!
13-
//! All features except `std` are disabled `by default. However, note that these features
13+
//! All features except `std` are disabled by default. Note that the last two features
1414
//! each alter the enum [`HostData`] in a backward incompatible way that could make it
1515
//! impossible for two crates that depend on different features of `fluent-uri` to
1616
//! be used together.
1717
//!
18+
//! - `std`: Enables `std` support. This includes [`Error`] implementations
19+
//! and `Ip{v4, v6}Addr` support in [`HostData`].
20+
//!
1821
//! - `ipv_future`: Enables the parsing of [IPvFuture] literal addresses,
1922
//! which fails with [`InvalidIpLiteral`] when disabled.
2023
//!
@@ -27,11 +30,10 @@
2730
//!
2831
//! This feature is based on the homonymous [draft] and is thus subject to change.
2932
//!
30-
//! - `std` (default): Enables `std` support.
31-
//!
33+
//! [`Error`]: std::error::Error
3234
//! [IPvFuture]: https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.2
3335
//! [`InvalidIpLiteral`]: ParseErrorKind::InvalidIpLiteral
34-
//! [draft]: https://datatracker.ietf.org/doc/html/draft-ietf-6man-rfc6874bis-02
36+
//! [draft]: https://datatracker.ietf.org/doc/html/draft-ietf-6man-rfc6874bis-05
3537
3638
extern crate alloc;
3739

src/parser.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl Parser {
238238
} else {
239239
// Empty authority.
240240
self.out.tag = Tag::HOST_REG_NAME;
241-
host = (self.pos, self.pos, HostData { reg_name: () });
241+
host = (self.pos, self.pos, HostData { none: () });
242242
}
243243
} else {
244244
// The whole authority scanned. Try to parse the host and port.
@@ -293,10 +293,10 @@ impl Parser {
293293
#[cfg(feature = "std")]
294294
ipv4_addr: _addr.into(),
295295
#[cfg(not(feature = "std"))]
296-
reg_name: (),
296+
none: (),
297297
},
298298
),
299-
_ => (Tag::HOST_REG_NAME, HostData { reg_name: () }),
299+
_ => (Tag::HOST_REG_NAME, HostData { none: () }),
300300
};
301301

302302
self.out.tag = tag;
@@ -488,10 +488,10 @@ impl Parser {
488488
#[cfg(feature = "std")]
489489
ipv4_addr: _addr.into(),
490490
#[cfg(not(feature = "std"))]
491-
reg_name: (),
491+
none: (),
492492
},
493493
),
494-
_ => (Tag::HOST_REG_NAME, HostData { reg_name: () }),
494+
_ => (Tag::HOST_REG_NAME, HostData { none: () }),
495495
};
496496
self.out.tag = tag;
497497
Ok(data)

0 commit comments

Comments
 (0)