Skip to content

Commit 5aeaf89

Browse files
committed
Make the uts46 module private
1 parent e3441b3 commit 5aeaf89

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

idna/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ extern crate unicode_bidi;
3838
extern crate unicode_normalization;
3939

4040
pub mod punycode;
41-
pub mod uts46;
41+
mod uts46;
42+
43+
pub use uts46::{Config, Errors};
4244

4345
/// The [domain to ASCII](https://url.spec.whatwg.org/#concept-domain-to-ascii) algorithm.
4446
///

idna/src/uts46.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use unicode_normalization::UnicodeNormalization;
1818

1919
include!("uts46_mapping_table.rs");
2020

21-
pub static PUNYCODE_PREFIX: &'static str = "xn--";
21+
const PUNYCODE_PREFIX: &'static str = "xn--";
2222

2323
#[derive(Debug)]
2424
struct StringTableSlice {

src/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ impl fmt::Display for ParseError {
6767
}
6868
}
6969

70-
impl From<::idna::uts46::Errors> for ParseError {
71-
fn from(_: ::idna::uts46::Errors) -> ParseError {
70+
impl From<::idna::Errors> for ParseError {
71+
fn from(_: ::idna::Errors) -> ParseError {
7272
ParseError::IdnaError
7373
}
7474
}

0 commit comments

Comments
 (0)