Skip to content

Commit 2db875f

Browse files
kenkooooclaude
andcommitted
refactor: use Box<dyn Error> instead of anyhow
For a simple binary, std::error::Error is sufficient. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5224a33 commit 2db875f

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

atcoder-problems-backend/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
anyhow.workspace = true
87
chrono.workspace = true
98
crawler.workspace = true
109
rand.workspace = true

atcoder-problems-backend/src/bin/dump-json.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
use anyhow::Result;
21
use s3::S3Client;
32
use sea_orm::{Database, DatabaseConnection, EntityTrait, QueryOrder};
43
use serde::Serialize;
54
use std::cmp::Reverse;
65
use std::collections::{BTreeMap, HashMap};
6+
use std::error::Error;
77

88
const LANGUAGE_COUNT_LIMIT: usize = 1000;
99

10+
type Result<T> = std::result::Result<T, Box<dyn Error>>;
11+
1012
#[tokio::main]
1113
async fn main() -> Result<()> {
1214
tracing_subscriber::fmt()

0 commit comments

Comments
 (0)