mirror of
https://github.com/martinvonz/jj.git
synced 2025-01-15 16:53:25 +00:00
cleanup: let newer Clippy fix a few things it found
This commit is contained in:
parent
94408f01e0
commit
8bbfe9731e
3 changed files with 7 additions and 10 deletions
|
@ -254,7 +254,7 @@ fn view_from_proto(proto: &crate::protos::op_store::View) -> View {
|
|||
let local_target = branch_proto
|
||||
.local_target
|
||||
.as_ref()
|
||||
.map(|ref_target_proto| ref_target_from_proto(ref_target_proto));
|
||||
.map(ref_target_from_proto);
|
||||
|
||||
let mut remote_targets = BTreeMap::new();
|
||||
for remote_branch in branch_proto.remote_branches.iter() {
|
||||
|
|
|
@ -2242,9 +2242,7 @@ fn edit_description(repo: &ReadonlyRepo, description: &str) -> String {
|
|||
.arg(&description_file_path)
|
||||
.status()
|
||||
.expect("failed to run editor");
|
||||
if !exit_status.success() {
|
||||
panic!("failed to run editor");
|
||||
}
|
||||
assert!(exit_status.success(), "failed to run editor");
|
||||
|
||||
let mut description_file = OpenOptions::new()
|
||||
.read(true)
|
||||
|
|
|
@ -412,12 +412,11 @@ pub fn parse_commit_template<'a>(
|
|||
let first_pair = pairs.next().unwrap();
|
||||
assert!(pairs.next().is_none());
|
||||
|
||||
if first_pair.as_span().end() != template_text.len() {
|
||||
panic!(
|
||||
"failed to parse template past position {}",
|
||||
first_pair.as_span().end()
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
!(first_pair.as_span().end() != template_text.len()),
|
||||
"failed to parse template past position {}",
|
||||
first_pair.as_span().end()
|
||||
);
|
||||
|
||||
parse_commit_template_rule(repo, first_pair)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue