summaryrefslogtreecommitdiffstats
path: root/openpgp/src/fmt.rs
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2020-03-30 12:28:20 +0200
committerNeal H. Walfield <neal@pep.foundation>2020-03-31 21:21:50 +0200
commit0693bee6431f2020ab9be8b85c59cbac3c5f9ffd (patch)
tree0326df73aab641cd7e1b2227d8669931058ebff3 /openpgp/src/fmt.rs
parentd270c7b59d0abd228a37149b53ac00617de6b858 (diff)
openpgp: Import Result instead of using an absolute path.
- Don't use `crate::Result` directly. Import it and then use `Result`.
Diffstat (limited to 'openpgp/src/fmt.rs')
-rw-r--r--openpgp/src/fmt.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/openpgp/src/fmt.rs b/openpgp/src/fmt.rs
index 6429c79f..586aa922 100644
--- a/openpgp/src/fmt.rs
+++ b/openpgp/src/fmt.rs
@@ -7,6 +7,8 @@ use crate::Result;
pub mod hex {
use std::io;
+ use crate::Result;
+
/// Encodes the given buffer as hexadecimal number.
pub fn encode<B: AsRef<[u8]>>(buffer: B) -> String {
super::to_hex(buffer.as_ref(), false)
@@ -18,12 +20,12 @@ pub mod hex {
}
/// Decodes the given hexadecimal number.
- pub fn decode<H: AsRef<str>>(hex: H) -> crate::Result<Vec<u8>> {
+ pub fn decode<H: AsRef<str>>(hex: H) -> Result<Vec<u8>> {
super::from_hex(hex.as_ref(), false)
}
/// Decodes the given hexadecimal number, ignoring whitespace.
- pub fn decode_pretty<H: AsRef<str>>(hex: H) -> crate::Result<Vec<u8>> {
+ pub fn decode_pretty<H: AsRef<str>>(hex: H) -> Result<Vec<u8>> {
super::from_hex(hex.as_ref(), true)
}