Skip to content

Commit fd7636c

Browse files
Improve naming of new FeaturesPage methods
1 parent 9446501 commit fd7636c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/web/features.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ impl FeaturesPage {
117117
true
118118
}
119119

120-
pub(crate) fn nb_enabled_default_features(&self) -> usize {
120+
pub(crate) fn enabled_default_features_count(&self) -> usize {
121121
self.default_features
122122
.iter()
123123
.filter(|f| !f.starts_with("dep:") && *f != "default" && !f.contains('/'))
124124
.count()
125125
}
126126

127-
pub(crate) fn nb_features(&self) -> usize {
127+
pub(crate) fn features_count(&self) -> usize {
128128
let Some(features) = &self.sorted_features else {
129129
return 0;
130130
};

templates/crate/features.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ <h1>{{ metadata.name }}</h1>
6565
{%- if features.is_empty() -%}
6666
<p data-id="empty-features">This release does not have any feature flags.</p>
6767
{%- else -%}
68-
<p>This version has <b>{{ nb_features() }}</b> feature flags, <b data-id="default-feature-len">{{ nb_enabled_default_features() }}</b> of them enabled by <b>default</b>.</p>
68+
<p>This version has <b>{{ features_count() }}</b> feature flags, <b data-id="default-feature-len">{{ enabled_default_features_count() }}</b> of them enabled by <b>default</b>.</p>
6969
{%- for feature in features -%}
7070
{%- let is_default = feature.name != "default" && is_default_feature(feature.name) -%}
7171
<h3 id="{{ feature.name }}">{{ feature.name }}{%- if is_default %} (default){%- endif -%}</h3>

0 commit comments

Comments
 (0)