Skip to content

Commit 0a92c73

Browse files
authored
Add support for '?' operator (#620)
closes #490.
1 parent c2f9227 commit 0a92c73

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

idna/src/uts46.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
use self::Mapping::*;
1313
use punycode;
1414
use std::cmp::Ordering::{Equal, Greater, Less};
15+
use std::{error::Error as StdError, fmt};
1516
use unicode_bidi::{bidi_class, BidiClass};
1617
use unicode_normalization::char::is_combining_mark;
1718
use unicode_normalization::UnicodeNormalization;
@@ -493,3 +494,11 @@ enum Error {
493494
/// More details may be exposed in the future.
494495
#[derive(Debug)]
495496
pub struct Errors(Vec<Error>);
497+
498+
impl StdError for Errors {}
499+
500+
impl fmt::Display for Errors {
501+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
502+
write!(f, "{:?}", self)
503+
}
504+
}

0 commit comments

Comments
 (0)