MCPcopy Create free account
hub / github.com/GCWing/BitFun / total_options

Method total_options

src/apps/cli/src/ui/question.rs:156–162  ·  view source on GitHub ↗

Total selectable items for current question (options + "Other")

(&self)

Source from the content-addressed store, hash-verified

154
155 /// Total selectable items for current question (options + "Other")
156 fn total_options(&self) -> usize {
157 if let Some(q) = self.current_question() {
158 q.options.len() + 1 // +1 for "Other"
159 } else {
160 0
161 }
162 }
163
164 /// Whether the selected option is "Other"
165 fn is_other_selected(&self) -> bool {

Callers 1

handle_question_keyMethod · 0.80

Calls 2

current_questionMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected