diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-06 10:12:02 +0100 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2024-03-06 10:12:02 +0100 |
commit | ba32a0d4a6810e4bf9d18f14086597c20212bbcb (patch) | |
tree | e46fc61d85228d3ffe1b0295fbffaca618b07a2a /src/dav/error.rs | |
parent | 2dd6deae545690cdcc00ca1123d1818598497fed (diff) | |
download | aerogramme-ba32a0d4a6810e4bf9d18f14086597c20212bbcb.tar.gz aerogramme-ba32a0d4a6810e4bf9d18f14086597c20212bbcb.zip |
decode errors
Diffstat (limited to 'src/dav/error.rs')
-rw-r--r-- | src/dav/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dav/error.rs b/src/dav/error.rs index 5bd8ed3..b04d2ac 100644 --- a/src/dav/error.rs +++ b/src/dav/error.rs @@ -6,6 +6,7 @@ pub enum ParsingError { NamespacePrefixAlreadyUsed, WrongToken, TagNotFound, + Utf8Error(std::str::Utf8Error), QuickXml(quick_xml::Error), Eof } @@ -19,3 +20,8 @@ impl From<quick_xml::Error> for ParsingError { Self::QuickXml(value) } } +impl From<std::str::Utf8Error> for ParsingError { + fn from(value: std::str::Utf8Error) -> Self { + Self::Utf8Error(value) + } +} |