Skip to content

Commit c2cb863

Browse files
style(clippy): replace &PathBuf with &Path in main.rs function args (#724)
1 parent 6f3558c commit c2cb863

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ async fn run_execute(
602602

603603
async fn build_execution_context(
604604
front_matter: compile::FrontMatter,
605-
safe_output_dir: &PathBuf,
605+
safe_output_dir: &Path,
606606
ado_org_url: Option<String>,
607607
ado_project: Option<String>,
608608
dry_run: bool,
@@ -631,7 +631,7 @@ async fn build_execution_context(
631631
if let Some(project) = ado_project {
632632
ctx.ado_project = Some(project);
633633
}
634-
ctx.working_directory = safe_output_dir.clone();
634+
ctx.working_directory = safe_output_dir.to_path_buf();
635635
ctx.tool_configs = front_matter.safe_outputs.clone();
636636
// Merge ado-aw-debug.create-issue config under the same tool_configs map
637637
// so Stage 3's `ctx.get_tool_config::<CreateIssueConfig>("create-issue")`
@@ -732,7 +732,7 @@ async fn discover_last_author(path: &Path) -> Option<String> {
732732

733733
async fn process_cache_memory(
734734
tools: Option<&compile::types::ToolsConfig>,
735-
safe_output_dir: &PathBuf,
735+
safe_output_dir: &Path,
736736
output_dir: Option<PathBuf>,
737737
) -> Result<()> {
738738
let Some(cm) = tools.and_then(|t| t.cache_memory.as_ref()) else {
@@ -744,7 +744,7 @@ async fn process_cache_memory(
744744
let memory_config = execute::MemoryConfig {
745745
allowed_extensions: cm.allowed_extensions().to_vec(),
746746
};
747-
let memory_output = output_dir.unwrap_or_else(|| safe_output_dir.clone());
747+
let memory_output = output_dir.unwrap_or_else(|| safe_output_dir.to_path_buf());
748748
let result =
749749
execute::process_agent_memory(safe_output_dir, &memory_output, &memory_config).await?;
750750
println!(

0 commit comments

Comments
 (0)