File tree Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Expand file tree Collapse file tree 4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ name = "fluent-uri"
3
3
version = " 0.1.3"
4
4
authors = [
" Scallop Ye <[email protected] >" ]
5
5
edition = " 2021"
6
- rust-version = " 1.69 .0"
6
+ rust-version = " 1.63 .0"
7
7
description = " A generic URI parser that strictly adheres to IETF RFC 3986."
8
8
documentation = " https://docs.rs/fluent-uri"
9
9
repository = " https://github.com/yescallop/fluent-uri-rs"
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ pub union RawHostData {
240
240
pub ipv6 : Ipv6Data ,
241
241
#[ cfg( feature = "ipv_future" ) ]
242
242
pub ipv_future_dot_i : u32 ,
243
- pub reg_name : ( ) ,
243
+ pub none : ( ) ,
244
244
}
245
245
246
246
#[ derive( Clone , Copy ) ]
Original file line number Diff line number Diff line change 10
10
//!
11
11
//! # Feature flags
12
12
//!
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
14
14
//! each alter the enum [`HostData`] in a backward incompatible way that could make it
15
15
//! impossible for two crates that depend on different features of `fluent-uri` to
16
16
//! be used together.
17
17
//!
18
+ //! - `std`: Enables `std` support. This includes [`Error`] implementations
19
+ //! and `Ip{v4, v6}Addr` support in [`HostData`].
20
+ //!
18
21
//! - `ipv_future`: Enables the parsing of [IPvFuture] literal addresses,
19
22
//! which fails with [`InvalidIpLiteral`] when disabled.
20
23
//!
27
30
//!
28
31
//! This feature is based on the homonymous [draft] and is thus subject to change.
29
32
//!
30
- //! - `std` (default): Enables `std` support.
31
- //!
33
+ //! [`Error`]: std::error::Error
32
34
//! [IPvFuture]: https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2.2
33
35
//! [`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
35
37
36
38
extern crate alloc;
37
39
Original file line number Diff line number Diff line change @@ -238,7 +238,7 @@ impl Parser {
238
238
} else {
239
239
// Empty authority.
240
240
self . out . tag = Tag :: HOST_REG_NAME ;
241
- host = ( self . pos , self . pos , HostData { reg_name : ( ) } ) ;
241
+ host = ( self . pos , self . pos , HostData { none : ( ) } ) ;
242
242
}
243
243
} else {
244
244
// The whole authority scanned. Try to parse the host and port.
@@ -293,10 +293,10 @@ impl Parser {
293
293
#[ cfg( feature = "std" ) ]
294
294
ipv4_addr : _addr. into ( ) ,
295
295
#[ cfg( not( feature = "std" ) ) ]
296
- reg_name : ( ) ,
296
+ none : ( ) ,
297
297
} ,
298
298
) ,
299
- _ => ( Tag :: HOST_REG_NAME , HostData { reg_name : ( ) } ) ,
299
+ _ => ( Tag :: HOST_REG_NAME , HostData { none : ( ) } ) ,
300
300
} ;
301
301
302
302
self . out . tag = tag;
@@ -488,10 +488,10 @@ impl Parser {
488
488
#[ cfg( feature = "std" ) ]
489
489
ipv4_addr : _addr. into ( ) ,
490
490
#[ cfg( not( feature = "std" ) ) ]
491
- reg_name : ( ) ,
491
+ none : ( ) ,
492
492
} ,
493
493
) ,
494
- _ => ( Tag :: HOST_REG_NAME , HostData { reg_name : ( ) } ) ,
494
+ _ => ( Tag :: HOST_REG_NAME , HostData { none : ( ) } ) ,
495
495
} ;
496
496
self . out . tag = tag;
497
497
Ok ( data)
You can’t perform that action at this time.
0 commit comments