From 6ca11065b96e8ce810893a83b47ef7c1add5c61f Mon Sep 17 00:00:00 2001 From: 2witstudios <2witstudios@gmail.com> Date: Sat, 7 Mar 2026 21:55:01 -0600 Subject: [PATCH] fix: Resolve rustdoc warnings and remove unwrap() on fallible path ops Wrap generic types in backticks in doc comments to prevent rustdoc from parsing them as unclosed HTML tags. Replace .unwrap() calls on path.file_name() with safe alternatives (let-else / ?-operator). Co-Authored-By: Claude Opus 4.6 --- crates/pu-cli/src/commands/agent_def.rs | 2 +- crates/pu-core/src/protocol.rs | 2 +- crates/pu-core/src/template.rs | 7 +++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/crates/pu-cli/src/commands/agent_def.rs b/crates/pu-cli/src/commands/agent_def.rs index d615311..198f269 100644 --- a/crates/pu-cli/src/commands/agent_def.rs +++ b/crates/pu-cli/src/commands/agent_def.rs @@ -7,7 +7,7 @@ use crate::error::CliError; use crate::output; use pu_core::protocol::Request; -/// Parse comma-separated tags string into a Vec. +/// Parse comma-separated tags string into a `Vec`. /// Empty string returns empty vec. Whitespace around each tag is trimmed. fn parse_tags(tags: &str) -> Vec { if tags.is_empty() { diff --git a/crates/pu-core/src/protocol.rs b/crates/pu-core/src/protocol.rs index d35cf56..6f4245f 100644 --- a/crates/pu-core/src/protocol.rs +++ b/crates/pu-core/src/protocol.rs @@ -5,7 +5,7 @@ use crate::types::{AgentStatus, WorktreeEntry}; pub const PROTOCOL_VERSION: u32 = 2; -/// Serde helper: encode Vec as hex in JSON for binary PTY data. +/// Serde helper: encode `Vec` as hex in JSON for binary PTY data. mod hex_bytes { use serde::{Deserialize, Deserializer, Serialize, Serializer}; diff --git a/crates/pu-core/src/template.rs b/crates/pu-core/src/template.rs index 582de67..d30ed93 100644 --- a/crates/pu-core/src/template.rs +++ b/crates/pu-core/src/template.rs @@ -230,7 +230,10 @@ fn scan_dir(dir: &Path, source: &str) -> Vec