void-packages/srcpkgs/tokei/patches/067fc4487ef2a8f53c29124b0aa...

26 lines
882 B
Diff

Upstream: yes
From 067fc4487ef2a8f53c29124b0aa3e9e793bfaadc Mon Sep 17 00:00:00 2001
From: Max Sharnoff <github@max.sharnoff.org>
Date: Mon, 4 Apr 2022 12:06:32 +0100
Subject: [PATCH] Summarise language before adding to total (#903)
---
src/language/languages.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/language/languages.rs b/src/language/languages.rs
index 141cae28..2b0fc584 100644
--- a/src/language/languages.rs
+++ b/src/language/languages.rs
@@ -102,7 +102,8 @@ impl Languages {
#[must_use]
pub fn total(self: &Languages) -> Language {
let mut total = Language::new();
- for (ty, language) in self {
+ for (ty, l) in self {
+ let language = l.summarise();
total.comments += language.comments;
total.blanks += language.blanks;
total.code += language.code;