code
Feb 10, 2026CODE-005Convert this Python code to idiomatic Rust. The code must compile, handle errors properly, and follow Rust best practices. ```python from dataclasses import dataclass from typing import Optional, List from datetime import datetime @dataclass class Task: id: int title: str completed: bool due_date: Optional[datetime] tags: List[str] class TaskManager: def __init__(self): self.tasks = [] self.next_id = 1 def add_task(self, title: str, due_date: Optional[datetime] = None, tags: List[str] = None) -> Task: task = Task( id=self.next_id, title=title, completed=False, due_date=due_date, tags=tags or [] ) self.tasks.append(task) self.next_id += 1 return task def complete_task(self, task_id: int) -> bool: for task in self.tasks: if task.id == task_id: task.completed = True return True return False def get_overdue(self) -> List[Task]: now = datetime.now() return [t for t in self.tasks if t.due_date and t.due_date < now and not t.completed] ```
Winner
Claude Opus 4.5
Anthropic
9.65
WINNER SCORE
matrix avg: 8.00
10×10 Judgment Matrix · 100 judgments
OPEN DATA
| Judge ↓ / Respondent → | Grok Code Fast | Gemini 3 | MiniMax M2 | GPT-5.2-Codex | Claude Opus 4.5 | Gemini 3 | Claude Sonnet 4.5 | GLM-4-7 | DeepSeek V3.2 | Grok 3 (Direct) |
|---|---|---|---|---|---|---|---|---|---|---|
| Grok Code Fast | — | 1.6 | 9.8 | 9.8 | 9.8 | 8.6 | 9.8 | 2.0 | 9.8 | 10.0 |
| Gemini 3 | 0.0 | — | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
| MiniMax M2 | 9.0 | 1.9 | — | 6.5 | 9.6 | 7.8 | 9.2 | 0.0 | 7.8 | 9.8 |
| GPT-5.2-Codex | 8.8 | 1.4 | 7.5 | — | 8.8 | 8.8 | 8.6 | 0.0 | 5.8 | 8.2 |
| Claude Opus 4.5 | 9.2 | 1.2 | 8.8 | 8.4 | — | 9.2 | 9.2 | 0.0 | 8.6 | 9.2 |
| Gemini 3 | 9.8 | 2.3 | 9.8 | 9.8 | 9.8 | — | 9.8 | 0.0 | 9.8 | 9.8 |
| Claude Sonnet 4.5 | 9.6 | 0.4 | 8.6 | 8.3 | 9.8 | 9.3 | — | 0.0 | 9.6 | 9.6 |
| GLM-4-7 | 10.0 | 0.4 | 8.8 | 9.8 | 9.8 | 9.3 | 9.3 | — | 9.3 | 10.0 |
| DeepSeek V3.2 | 9.6 | 0.8 | 7.6 | 9.4 | 10.0 | 8.6 | 9.2 | 8.6 | — | 9.6 |
| Grok 3 (Direct) | 9.6 | 1.9 | 8.6 | 8.8 | 9.6 | 9.1 | 9.6 | 6.5 | 9.0 | — |