diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-04-17 02:12:35 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-04-17 02:12:35 -0400 |
commit | 7e7cb24a1edcd5395469b04a5852b94eb82f2f88 (patch) | |
tree | befb429f1b298ef70da25dcb1eef9299f0797417 /src | |
parent | c248016ea7ebc20551913cc1dfb5dc022fa3440d (diff) | |
download | rbw-7e7cb24a1edcd5395469b04a5852b94eb82f2f88.tar.gz rbw-7e7cb24a1edcd5395469b04a5852b94eb82f2f88.zip |
bump deps
Diffstat (limited to 'src')
-rw-r--r-- | src/locked.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/locked.rs b/src/locked.rs index 3cad927..aecc54d 100644 --- a/src/locked.rs +++ b/src/locked.rs @@ -1,13 +1,15 @@ use zeroize::Zeroize; +const LEN: usize = 4096; + pub struct Vec { - data: Box<arrayvec::ArrayVec<[u8; 4096]>>, + data: Box<arrayvec::ArrayVec<u8, LEN>>, _lock: region::LockGuard, } impl Default for Vec { fn default() -> Self { - let data = Box::new(arrayvec::ArrayVec::<_>::new()); + let data = Box::new(arrayvec::ArrayVec::<_, LEN>::new()); // XXX it'd be nice to handle this better than .unwrap(), but it'd be // a lot of effort let lock = region::lock(data.as_ptr(), data.capacity()).unwrap(); |