summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2019-09-10 16:57:21 +0200
committerJustus Winter <justus@sequoia-pgp.org>2019-09-10 16:57:21 +0200
commita37507842086261f0168cb1ac20423f865530acf (patch)
tree600c7ef54757d3d041511912bc78474e357edca2 /openpgp
parent5e861abe28573fcd322a5996530d195b569b4fce (diff)
openpgp: Remove aliases from the toplevel, move to packet::header.
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/lib.rs3
-rw-r--r--openpgp/src/packet/header.rs4
-rw-r--r--openpgp/src/parse/parse.rs8
-rw-r--r--openpgp/src/parse/partial_body.rs2
-rw-r--r--openpgp/src/serialize/mod.rs6
-rw-r--r--openpgp/src/serialize/partial_body.rs2
6 files changed, 16 insertions, 9 deletions
diff --git a/openpgp/src/lib.rs b/openpgp/src/lib.rs
index 9d295c24..72df6653 100644
--- a/openpgp/src/lib.rs
+++ b/openpgp/src/lib.rs
@@ -109,8 +109,7 @@ pub mod conversions;
pub mod crypto;
pub mod packet;
-use crate::packet::{BodyLength, Header, Container, key};
-use crate::packet::ctb::{CTB, CTBOld, CTBNew};
+use crate::packet::{Container, key};
pub mod parse;
diff --git a/openpgp/src/packet/header.rs b/openpgp/src/packet/header.rs
index 7e3edbba..776d83eb 100644
--- a/openpgp/src/packet/header.rs
+++ b/openpgp/src/packet/header.rs
@@ -3,10 +3,10 @@
use crate::{
Error,
Result,
- BodyLength,
};
use crate::packet::tag::Tag;
-use crate::packet::ctb::CTB;
+pub use crate::packet::BodyLength;
+pub use crate::packet::ctb::{self, CTB};
/// An OpenPGP packet's header.
#[derive(Clone, Debug)]
diff --git a/openpgp/src/parse/parse.rs b/openpgp/src/parse/parse.rs
index 07d6ca08..37acc8b6 100644
--- a/openpgp/src/parse/parse.rs
+++ b/openpgp/src/parse/parse.rs
@@ -15,11 +15,13 @@ use ::buffered_reader::*;
use crate::{
crypto::{aead, hash::Hash},
Result,
- CTB,
- BodyLength,
+ packet::header::{
+ CTB,
+ BodyLength,
+ },
crypto::s2k::S2K,
Error,
- Header,
+ packet::Header,
packet::signature::Signature4,
packet::prelude::*,
Packet,
diff --git a/openpgp/src/parse/partial_body.rs b/openpgp/src/parse/partial_body.rs
index 4811e279..13b3f6b9 100644
--- a/openpgp/src/parse/partial_body.rs
+++ b/openpgp/src/parse/partial_body.rs
@@ -4,7 +4,7 @@ use std::io;
use std::io::{Error, ErrorKind};
use buffered_reader::{buffered_reader_generic_read_impl, BufferedReader};
-use crate::BodyLength;
+use crate::packet::header::BodyLength;
use crate::parse::{Cookie, Hashing};
const TRACE : bool = false;
diff --git a/openpgp/src/serialize/mod.rs b/openpgp/src/serialize/mod.rs
index 1ba676d5..2eaa6863 100644
--- a/openpgp/src/serialize/mod.rs
+++ b/openpgp/src/serialize/mod.rs
@@ -26,6 +26,12 @@ pub mod stream;
#[cfg(feature = "compression-deflate")]
pub mod padding;
use crate::crypto::s2k::S2K;
+use crate::packet::header::{
+ BodyLength,
+ CTB,
+ ctb::CTBNew,
+ ctb::CTBOld,
+};
use crate::packet::signature::subpacket::{
Subpacket, SubpacketValue, SubpacketLengthTrait,
};
diff --git a/openpgp/src/serialize/partial_body.rs b/openpgp/src/serialize/partial_body.rs
index ab26e9d2..72f188f9 100644
--- a/openpgp/src/serialize/partial_body.rs
+++ b/openpgp/src/serialize/partial_body.rs
@@ -7,7 +7,7 @@ use std::cmp;
use crate::Error;
use crate::Result;
-use crate::BodyLength;
+use crate::packet::header::BodyLength;
use super::{writer, write_byte, Serialize};
pub struct PartialBodyFilter<'a, C: 'a> {