diff --git a/cli/src/commands/resolve.rs b/cli/src/commands/resolve.rs index 735ae71a0..8b62092d5 100644 --- a/cli/src/commands/resolve.rs +++ b/cli/src/commands/resolve.rs @@ -93,7 +93,7 @@ pub(crate) fn cmd_resolve( ); }; - let (repo_path, _) = conflicts.get(0).unwrap(); + let (repo_path, _) = conflicts.first().unwrap(); workspace_command.check_rewritable([&commit])?; let mut tx = workspace_command.start_transaction(&format!( "Resolve conflicts in commit {}", diff --git a/cli/tests/test_commit_command.rs b/cli/tests/test_commit_command.rs index 1aa1f2070..2592aa32d 100644 --- a/cli/tests/test_commit_command.rs +++ b/cli/tests/test_commit_command.rs @@ -85,7 +85,7 @@ fn test_commit_with_default_description() { std::fs::write(workspace_path.join("file1"), "foo\n").unwrap(); std::fs::write(workspace_path.join("file2"), "bar\n").unwrap(); let edit_script = test_env.set_up_fake_editor(); - std::fs::write(&edit_script, ["dump editor"].join("\0")).unwrap(); + std::fs::write(edit_script, ["dump editor"].join("\0")).unwrap(); test_env.jj_cmd_ok(&workspace_path, &["commit"]); insta::assert_snapshot!(get_log_output(&test_env, &workspace_path), @r#" diff --git a/cli/tests/test_describe_command.rs b/cli/tests/test_describe_command.rs index 6ecbfe271..4effd8210 100644 --- a/cli/tests/test_describe_command.rs +++ b/cli/tests/test_describe_command.rs @@ -259,7 +259,7 @@ fn test_describe_default_description() { std::fs::write(workspace_path.join("file1"), "foo\n").unwrap(); std::fs::write(workspace_path.join("file2"), "bar\n").unwrap(); let edit_script = test_env.set_up_fake_editor(); - std::fs::write(&edit_script, ["dump editor"].join("\0")).unwrap(); + std::fs::write(edit_script, ["dump editor"].join("\0")).unwrap(); let (stdout, stderr) = test_env.jj_cmd_ok(&workspace_path, &["describe"]); insta::assert_snapshot!(stdout, @""); insta::assert_snapshot!(stderr, @r###"