Skip to content

Commit a64f060

Browse files
GiggleLiuclaude
andcommitted
fix: update MCP server and CLI for Vec<&str> size_field_names return type
Fix borrow-after-move in graph show command and use reference in MCP tools JSON serialization. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 974ef2e commit a64f060

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

problemreductions-cli/src/commands/graph.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ pub fn show(problem: &str, out: &OutputConfig) -> Result<()> {
143143
"\n{}\n",
144144
crate::output::fmt_section(&format!("Size fields ({}):", size_fields.len()))
145145
));
146-
for f in size_fields {
146+
for f in &size_fields {
147147
text.push_str(&format!(" {f}\n"));
148148
}
149149
}

problemreductions-cli/src/mcp/tools.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ impl McpServer {
177177
let mut json = serde_json::json!({
178178
"name": spec.name,
179179
"variants": variants,
180-
"size_fields": size_fields,
180+
"size_fields": &size_fields,
181181
"reduces_to": outgoing.iter().map(|e| {
182182
serde_json::json!({
183183
"source": {"name": e.source_name, "variant": e.source_variant},

0 commit comments

Comments
 (0)