(&self, scope: Scope<'_>)
| 64 | } |
| 65 | |
| 66 | fn exec(&self, scope: Scope<'_>) -> CallResult<()> { |
| 67 | let mut output = self.output.borrow_mut(); |
| 68 | |
| 69 | let mut i = 0; |
| 70 | |
| 71 | let (formatted, present, sep) = format_vararg(&scope, i); |
| 72 | assert_ne!(ArgSep::End, sep, "Command expects more arguments"); |
| 73 | output.push_str(&formatted); |
| 74 | output.push('\n'); |
| 75 | i += 1; |
| 76 | if present { |
| 77 | i += 1; |
| 78 | } |
| 79 | |
| 80 | let formatted = format_arg(&scope, i, ExprType::Integer); |
| 81 | output.push_str(&formatted); |
| 82 | output.push('\n'); |
| 83 | i += 1; |
| 84 | |
| 85 | let (formatted, present, sep) = format_vararg(&scope, i); |
| 86 | assert!(present, "Last argument is not optional"); |
| 87 | assert_eq!(ArgSep::End, sep, "No more arguments expected"); |
| 88 | output.push_str(&formatted); |
| 89 | output.push('\n'); |
| 90 | |
| 91 | Ok(()) |
| 92 | } |
| 93 | } |
nothing calls this directly
no test coverage detected