Skip to content

Commit

Permalink
Final fix to new_for_token_source documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
loftyinclination committed Dec 9, 2024
1 parent 4c9673b commit df4a4dc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/intern.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ pub struct Interner<T: Hash + Eq> {
}

impl<T: Hash + Eq> Interner<T> {
/// Create an Interner with an initial capacity calculated by calling.
/// [`estimate_tokens`](crate::intern::TokenSource::estimate_tokens) methods of `before` and `after`
/// Create an Interner with an initial capacity calculated by summing the results of calling
/// [`estimate_tokens`](crate::intern::TokenSource::estimate_tokens) methods of `before` and `after`.
pub fn new_for_token_source<S: TokenSource<Token = T>>(before: &S, after: &S) -> Self {
Self::new(before.estimate_tokens() as usize + after.estimate_tokens() as usize)
}
Expand Down

0 comments on commit df4a4dc

Please sign in to comment.