gpgmime

Create mail agent parseable email from a PGP message
git clone git://git.defalsify.org/gigmime.git
Log | Files | Refs | LICENSE

commit 358d852891808eced395b51ac11a4244ce3a6748
parent 4f8d1cb56ca5c72c67dd919b5e46f666ec43be6b
Author: lash <dev@holbrook.no>
Date:   Wed, 12 Oct 2022 15:38:08 +0000

Remove warnings, add missing cargo metadata

Diffstat:
ACHANGELOG | 4++++
MCargo.toml | 4++++
Msrc/main.rs | 7+------
3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG @@ -0,0 +1,4 @@ +- 0.0.1 + * Handle .gpg and .asc message format input (as file) + * Output application/encrypted email format + * Provide to, from and subject as arguments diff --git a/Cargo.toml b/Cargo.toml @@ -3,6 +3,10 @@ name = "gpgmime" version = "0.0.1" edition = "2021" authors = ["Louis Holbrook <dev@holbrook.no> (https://holbrook.no)"] +license = "GPL-3.0-or-later" +description = "Create multipart/encrypted email from PGP message" +repository = "https://git.defalsify.org/gpgmime" +categories = ["command-line-utilities", "email"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/main.rs b/src/main.rs @@ -1,8 +1,4 @@ use std::io::Write; -use std::io::Read; -use std::fs::read; -use std::env::args; -use std::path::Path; use sequoia_openpgp::parse::Parse; use sequoia_openpgp::Message; @@ -13,7 +9,6 @@ use mail_builder::MessageBuilder; use mail_builder::mime::MimePart; use clap::App; use clap::Arg; -use clap::ArgMatches; struct Settings { to: String, @@ -74,7 +69,7 @@ fn main() { let msg = Message::from_file(settings.path).unwrap(); let mut msg_w = ArmorWriter::new(Vec::new(), Kind::Message).unwrap(); - msg_w.write_all(msg.to_vec().unwrap().as_ref()); + let _c = msg_w.write_all(msg.to_vec().unwrap().as_ref()); let msg_b = msg_w.finalize().unwrap(); let msg_s = String::from_utf8_lossy(&msg_b);