mirror of
https://github.com/gitui-org/gitui
synced 2026-05-23 08:58:21 +00:00
fix warnings and deny deprecated (#2753)
* fix gitoxide warning * do not allow deprecated fn
This commit is contained in:
parent
88ace76db5
commit
6bb216c0d4
4 changed files with 16 additions and 39 deletions
|
|
@ -15,7 +15,8 @@ It wraps libraries like git2 and gix.
|
|||
unused_must_use,
|
||||
dead_code,
|
||||
unstable_name_collisions,
|
||||
unused_assignments
|
||||
unused_assignments,
|
||||
deprecated
|
||||
)]
|
||||
#![deny(clippy::all, clippy::perf, clippy::nursery, clippy::pedantic)]
|
||||
#![deny(
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ impl<'a> LogWalkerWithoutFilter<'a> {
|
|||
// reason this is 2^14, so benchmarking might reveal that there’s better values.
|
||||
repo.object_cache_size_if_unset(2_usize.pow(14));
|
||||
|
||||
let commit = repo.head()?.peel_to_commit_in_place()?;
|
||||
let commit = repo.head()?.peel_to_commit()?;
|
||||
|
||||
let tips = [commit.id];
|
||||
|
||||
|
|
|
|||
|
|
@ -369,12 +369,8 @@ mod tests {
|
|||
let (remote_dir, _remote) = repo_init().unwrap();
|
||||
let remote_path = remote_dir.path().to_str().unwrap();
|
||||
let (repo_dir, _repo) = repo_clone(remote_path).unwrap();
|
||||
let repo_path: &RepoPath = &repo_dir
|
||||
.into_path()
|
||||
.as_os_str()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.into();
|
||||
let repo_path: &RepoPath =
|
||||
&repo_dir.keep().as_os_str().to_str().unwrap().into();
|
||||
|
||||
let remotes = get_remotes(repo_path).unwrap();
|
||||
|
||||
|
|
@ -388,12 +384,8 @@ mod tests {
|
|||
let (remote_dir, _remote) = repo_init().unwrap();
|
||||
let remote_path = remote_dir.path().to_str().unwrap();
|
||||
let (repo_dir, _repo) = repo_clone(remote_path).unwrap();
|
||||
let repo_path: &RepoPath = &repo_dir
|
||||
.into_path()
|
||||
.as_os_str()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.into();
|
||||
let repo_path: &RepoPath =
|
||||
&repo_dir.keep().as_os_str().to_str().unwrap().into();
|
||||
|
||||
debug_cmd_print(
|
||||
repo_path,
|
||||
|
|
@ -418,12 +410,8 @@ mod tests {
|
|||
let (remote_dir, _remote) = repo_init().unwrap();
|
||||
let remote_path = remote_dir.path().to_str().unwrap();
|
||||
let (repo_dir, _repo) = repo_clone(remote_path).unwrap();
|
||||
let repo_path: &RepoPath = &repo_dir
|
||||
.into_path()
|
||||
.as_os_str()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.into();
|
||||
let repo_path: &RepoPath =
|
||||
&repo_dir.keep().as_os_str().to_str().unwrap().into();
|
||||
|
||||
debug_cmd_print(
|
||||
repo_path,
|
||||
|
|
@ -454,12 +442,8 @@ mod tests {
|
|||
let (remote_dir, _remote) = repo_init().unwrap();
|
||||
let remote_path = remote_dir.path().to_str().unwrap();
|
||||
let (repo_dir, _repo) = repo_clone(remote_path).unwrap();
|
||||
let repo_path: &RepoPath = &repo_dir
|
||||
.into_path()
|
||||
.as_os_str()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.into();
|
||||
let repo_path: &RepoPath =
|
||||
&repo_dir.keep().as_os_str().to_str().unwrap().into();
|
||||
|
||||
debug_cmd_print(
|
||||
repo_path,
|
||||
|
|
@ -494,12 +478,8 @@ mod tests {
|
|||
let (remote_dir, _remote) = repo_init().unwrap();
|
||||
let remote_path = remote_dir.path().to_str().unwrap();
|
||||
let (repo_dir, repo) = repo_clone(remote_path).unwrap();
|
||||
let repo_path: &RepoPath = &repo_dir
|
||||
.into_path()
|
||||
.as_os_str()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.into();
|
||||
let repo_path: &RepoPath =
|
||||
&repo_dir.keep().as_os_str().to_str().unwrap().into();
|
||||
|
||||
debug_cmd_print(
|
||||
repo_path,
|
||||
|
|
@ -530,12 +510,8 @@ mod tests {
|
|||
let (remote_dir, _remote) = repo_init().unwrap();
|
||||
let remote_path = remote_dir.path().to_str().unwrap();
|
||||
let (repo_dir, repo) = repo_clone(remote_path).unwrap();
|
||||
let repo_path: &RepoPath = &repo_dir
|
||||
.into_path()
|
||||
.as_os_str()
|
||||
.to_str()
|
||||
.unwrap()
|
||||
.into();
|
||||
let repo_path: &RepoPath =
|
||||
&repo_dir.keep().as_os_str().to_str().unwrap().into();
|
||||
|
||||
debug_cmd_print(
|
||||
repo_path,
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ mod tests {
|
|||
s.add_finalize().unwrap();
|
||||
}
|
||||
|
||||
let repo_p = RepoPath::Path(dir.into_path());
|
||||
let repo_p = RepoPath::Path(dir.keep());
|
||||
let subs = get_submodules(&repo_p).unwrap();
|
||||
|
||||
assert_eq!(subs.len(), 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue