Skip to content
This repository was archived by the owner on Mar 27, 2026. It is now read-only.

Commit 40abf45

Browse files
committed
fix lint errors
1 parent 9bcc1a0 commit 40abf45

3 files changed

Lines changed: 2 additions & 14 deletions

File tree

src/cli.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,9 @@ use crate::error::Result;
55
use crate::repodiff::RepoDiff;
66
use crate::utils::git_operations::GitOperations;
77

8-
/// Version of the application
9-
const VERSION: &str = env!("CARGO_PKG_VERSION");
10-
118
/// Command-line arguments for RepoDiff
129
#[derive(Parser, Debug)]
13-
#[command(author, version, about, long_about = None)]
10+
#[command(author, version = env!("CARGO_PKG_VERSION"), about, long_about = None)]
1411
pub struct Args {
1512
/// The file to output the combined diff
1613
#[arg(short, long)]

src/repodiff.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ use crate::filters::filter_manager::FilterManager;
1010

1111
/// Main class for the RepoDiff tool that handles the core functionality
1212
pub struct RepoDiff {
13-
/// Configuration manager
14-
config_manager: ConfigManager,
1513
/// Token counter
1614
token_counter: TokenCounter,
1715
/// Filter manager
@@ -33,7 +31,6 @@ impl RepoDiff {
3331
let git_operations = GitOperations::new();
3432

3533
Ok(RepoDiff {
36-
config_manager,
3734
token_counter,
3835
filter_manager,
3936
git_operations,

src/utils/token_counter.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ use crate::error::{RepoDiffError, Result};
33

44
/// Handles token counting for LLM models using tiktoken
55
pub struct TokenCounter {
6-
/// The tiktoken model
7-
model: String,
86
/// The tiktoken encoding
97
bpe: CoreBPE,
108
}
@@ -18,11 +16,7 @@ impl TokenCounter {
1816
pub fn new(model: &str) -> Result<Self> {
1917
let bpe = tiktoken_rs::get_bpe_from_model(model)
2018
.map_err(|e| RepoDiffError::TiktokenError(format!("Failed to get BPE for model {}: {}", model, e)))?;
21-
22-
Ok(TokenCounter {
23-
model: model.to_string(),
24-
bpe,
25-
})
19+
Ok(Self { bpe })
2620
}
2721

2822
/// Count the number of tokens in the given text

0 commit comments

Comments
 (0)