Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
redox-os
pkgar
Commits
f5cbcc6a
Verified
Commit
f5cbcc6a
authored
Aug 03, 2021
by
Jeremy Soller
Browse files
Fix for compilation with stable rust
parent
dbfc5cdb
Changes
2
Hide whitespace changes
Inline
Side-by-side
pkgar-core/src/lib.rs
View file @
f5cbcc6a
#![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
);
}
}
pkgar/src/bin.rs
View file @
f5cbcc6a
...
...
@@ -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
(())
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment