Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8889a01

Browse files
author
fossdd
committed
Update pijul
1 parent 45c378a commit 8889a01

File tree

6 files changed

+127
-126
lines changed

6 files changed

+127
-126
lines changed

Cargo.lock

+11-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

libpijul/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "libpijul"
33
description = "Core library of Pijul, a distributed version control system based on a sound theory of collaborative work."
4-
version = "1.0.0-alpha.47"
4+
version = "1.0.0-alpha.48"
55

66
repository = "https://nest.pijul.com/pijul/libpijul"
77
documentation = "https://docs.rs/libpijul"
@@ -116,7 +116,7 @@ twox-hash = "1.6"
116116
crossbeam-deque = "0.8"
117117
crossbeam-utils = "0.8"
118118

119-
zstd-seekable = { version = "0.1.7", optional = true }
119+
zstd-seekable = { version = "0.2.0", optional = true }
120120
cfg-if = "1.0"
121121
memchr = "2.4"
122122

libpijul/src/change/change_file.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ use super::*;
22

33
/// An open, seekable change file.
44
#[cfg(feature = "zstd")]
5-
pub struct ChangeFile<'a> {
6-
s: Option<zstd_seekable::Seekable<'a, OffFile>>,
5+
pub struct ChangeFile {
6+
s: Option<zstd_seekable::Seekable<OffFile>>,
77
hashed: Hashed<Hunk<Option<Hash>, Local>, Author>,
88
hash: Hash,
99
unhashed: Option<toml::Value>,
@@ -34,7 +34,7 @@ impl std::io::Seek for OffFile {
3434
}
3535

3636
#[cfg(feature = "zstd")]
37-
impl<'a> ChangeFile<'a> {
37+
impl ChangeFile {
3838
/// Open a change file from a path.
3939
pub fn open(hash: Hash, path: &str) -> Result<Self, ChangeError> {
4040
use std::io::Read;
@@ -84,10 +84,10 @@ impl<'a> ChangeFile<'a> {
8484
let s = if offsets.contents_off >= m.len() {
8585
None
8686
} else {
87-
Some(zstd_seekable::Seekable::init(Box::new(OffFile {
87+
Some(zstd_seekable::Seekable::init(OffFile {
8888
f: r,
8989
start: offsets.contents_off,
90-
}))?)
90+
}, None)?)
9191
};
9292
Ok(ChangeFile {
9393
s,

libpijul/src/changestore/filesystem.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::path::{Path, PathBuf};
66

77
/// A file system change store.
88
pub struct FileSystem {
9-
change_cache: RefCell<lru_cache::LruCache<ChangeId, ChangeFile<'static>>>,
9+
change_cache: RefCell<lru_cache::LruCache<ChangeId, ChangeFile>>,
1010
changes_dir: PathBuf,
1111
}
1212

@@ -79,7 +79,7 @@ impl FileSystem {
7979
hash: F,
8080
change: ChangeId,
8181
) -> Result<
82-
std::cell::RefMut<lru_cache::LruCache<ChangeId, ChangeFile<'static>>>,
82+
std::cell::RefMut<lru_cache::LruCache<ChangeId, ChangeFile>>,
8383
crate::change::ChangeError,
8484
> {
8585
let mut change_cache = self.change_cache.borrow_mut();

pijul/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ fs2 = "0.4"
9090
path-slash = "0.1"
9191
bytes = "1.0"
9292
rlimit = "0.6"
93+
thiserror = "1.0"
9394

9495
[target.'cfg(unix)'.dependencies]
9596
pager = "0.16.0"

0 commit comments

Comments
 (0)