diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2019-09-10 15:23:55 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2019-09-10 15:23:55 +0200 |
commit | 8495b849255551f14b81d7bce6e3c0fce6957df3 (patch) | |
tree | 6fe83583ddbc4b2c777c301d44ffa8f23d676062 /tool/src | |
parent | df47e8c08f06f79ab13ceea435044c37e40000d1 (diff) |
openpgp: Make fields of parse::map::Field private.
Diffstat (limited to 'tool/src')
-rw-r--r-- | tool/src/commands/dump.rs | 8 | ||||
-rw-r--r-- | tool/src/commands/mod.rs | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tool/src/commands/dump.rs b/tool/src/commands/dump.rs index 8c01e3ed..a587783b 100644 --- a/tool/src/commands/dump.rs +++ b/tool/src/commands/dump.rs @@ -652,13 +652,13 @@ impl PacketDumper { writeln!(output, "{}", i)?; let mut hd = hex::Dumper::new(output, self.indentation_for_hexdump( i, map.iter() - .map(|f| if f.name == "body" { 16 } else { f.name.len() }) + .map(|f| if f.name() == "body" { 16 } else { f.name().len() }) .max() .expect("we always have one entry"))); for field in map.iter() { - if field.name == "body" { - hd.write_labeled(field.data, |offset, data| { + if field.name() == "body" { + hd.write_labeled(field.data(), |offset, data| { let mut l = String::new(); for _ in 0..offset { l.push(' '); @@ -675,7 +675,7 @@ impl PacketDumper { Some(l) })?; } else { - hd.write(field.data, field.name)?; + hd.write(field.data(), field.name())?; } } diff --git a/tool/src/commands/mod.rs b/tool/src/commands/mod.rs index 44173e04..f07b5445 100644 --- a/tool/src/commands/mod.rs +++ b/tool/src/commands/mod.rs @@ -411,7 +411,7 @@ pub fn split(input: &mut io::Read, prefix: &str) // Write all the bytes. for field in map.iter() { - sink.write_all(field.data)?; + sink.write_all(field.data())?; } } @@ -444,7 +444,7 @@ pub fn join(inputs: Option<clap::Values>, output: &mut io::Write) // We (ab)use the mapping feature to create byte-accurate // copies. for field in pp.map().expect("must be mapped").iter() { - output.write_all(field.data)?; + output.write_all(field.data())?; } ppr = pp.next()?.1; |