(scope: &Scope<'_>, narg: u8)
| 149 | |
| 150 | fn exec(&self, scope: Scope<'_>) -> CallResult<()> { |
| 151 | fn get_color(scope: &Scope<'_>, narg: u8) -> CallResult<Option<u8>> { |
| 152 | let i = scope.get_integer(narg); |
| 153 | if i >= 0 && i <= u8::MAX as i32 { |
| 154 | Ok(Some(i as u8)) |
| 155 | } else { |
| 156 | Err(CallError::Syntax(scope.get_pos(narg), "Color out of range".to_owned())) |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | let (fg, bg) = if scope.nargs() == 0 { |
| 161 | (None, None) |
nothing calls this directly
no test coverage detected