mirror of
https://github.com/miniflux/v2.git
synced 2025-07-12 16:58:36 +00:00
refactor: use min/max instead of math.Min/math.Max
This saves a couple of back'n'forth casts.
This commit is contained in:
parent
1b0b8b9c42
commit
e6185b1393
3 changed files with 5 additions and 6 deletions
|
@ -19,7 +19,7 @@ func EstimateReadingTime(content string, defaultReadingSpeed, cjkReadingSpeed in
|
|||
sanitizedContent := sanitizer.StripTags(content)
|
||||
|
||||
// Litterature on language detection says that around 100 signes is enough, we're safe here.
|
||||
truncationPoint := int(math.Min(float64(len(sanitizedContent)), 250))
|
||||
truncationPoint := min(len(sanitizedContent), 250)
|
||||
|
||||
// We're only interested in identifying Japanse/Chinese/Korean
|
||||
options := whatlanggo.Options{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue