Verified Commit f5cbcc6a authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Fix for compilation with stable rust

parent dbfc5cdb
#![no_std]
#![feature(min_const_generics)]
extern crate alloc;
use core::mem;
......@@ -34,7 +33,7 @@ impl Mode {
pub fn kind(self) -> Mode {
self & Mode::KIND
}
/// Only any permissions bits
pub fn perm(self) -> Mode {
self & Mode::PERM
......@@ -59,4 +58,3 @@ mod tests {
assert_eq!(ENTRY_SIZE, 308);
}
}
......@@ -146,7 +146,7 @@ pub fn create(
.read(true)
.open(&path)
.chain_err(|| &path )?;
copy_and_hash(&mut entry_file, &mut archive_file, &mut buf)
.chain_err(|| &path )
.chain_err(|| format!("Writing entry to archive: '{}'", relative.display()) )?
......@@ -179,7 +179,7 @@ pub fn create(
//TODO: ensure file size matches
header.signature = sign::sign_detached(unsafe { &plain::as_bytes(&header)[64..] }, &secret_key).0;
header.signature = sign::sign_detached(unsafe { &plain::as_bytes(&header)[64..] }, &secret_key).to_bytes();
// Write archive header
archive_file.seek(SeekFrom::Start(0))
......@@ -271,4 +271,3 @@ pub fn verify(
}
Ok(())
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment