aboutsummaryrefslogtreecommitdiffstats
path: root/license-generator/src/zip.rs
diff options
context:
space:
mode:
authorTeddy Wing2018-11-13 03:14:03 +0100
committerTeddy Wing2018-11-13 03:14:03 +0100
commitf8e04f96df65616fff89e7faac707f999176d18b (patch)
treef7a82fb51601553f9d4115b73b16791f534b9e9d /license-generator/src/zip.rs
parentf0a562869567f535441c8ce3cf6e86193abf7996 (diff)
downloaddome-key-web-f8e04f96df65616fff89e7faac707f999176d18b.tar.bz2
license: Generate a license and send it in HTTP response
If the purchaser coming from POST params is found in the database, generate a license for the purchaser, zip the license, and send a response containing the zipped data. zip: Change the writer input to a mutable reference to enable us to use the zip data when writing to the response. Otherwise we get a borrow error.
Diffstat (limited to 'license-generator/src/zip.rs')
-rw-r--r--license-generator/src/zip.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/license-generator/src/zip.rs b/license-generator/src/zip.rs
index 6c08368..7b3600c 100644
--- a/license-generator/src/zip.rs
+++ b/license-generator/src/zip.rs
@@ -4,7 +4,7 @@ use zip_lib as zip;
use errors::*;
-pub fn license<W: Write + Seek>(w: W, plist: &[u8]) -> Result<()> {
+pub fn license<W: Write + Seek>(w: &mut W, plist: &[u8]) -> Result<()> {
let mut zip = zip::ZipWriter::new(w);
zip.start_file(