directory_files/2: throw representation error if into_string() fails

Suggested by @notoria in #606. Many thanks!
This commit is contained in:
Markus Triska
2020-06-20 10:12:14 +02:00
parent aa9432e24f
commit 65f200e02c
2 changed files with 12 additions and 4 deletions

View File

@@ -575,7 +575,7 @@ impl DomainErrorType {
// from 7.12.2 f) of 13211-1:1995
#[derive(Debug, Clone, Copy)]
pub enum RepFlag {
// Character,
Character,
CharacterCode,
InCharacterCode,
MaxArity,
@@ -586,7 +586,7 @@ pub enum RepFlag {
impl RepFlag {
pub fn as_str(self) -> &'static str {
match self {
// RepFlag::Character => "character",
RepFlag::Character => "character",
RepFlag::CharacterCode => "character_code",
RepFlag::InCharacterCode => "in_character_code",
RepFlag::MaxArity => "max_arity",