(&self, encode: bool)
| 270 | } |
| 271 | |
| 272 | fn client_context(&self, encode: bool) -> Result<Option<String>> { |
| 273 | let mut data = if let Some(file) = &self.client_context_file { |
| 274 | read_to_string(file) |
| 275 | .into_diagnostic() |
| 276 | .wrap_err("error reading client context file")? |
| 277 | } else if let Some(data) = &self.client_context_ascii { |
| 278 | data.clone() |
| 279 | } else { |
| 280 | return Ok(None); |
| 281 | }; |
| 282 | |
| 283 | if encode { |
| 284 | data = b64::STANDARD.encode(data) |
| 285 | } |
| 286 | |
| 287 | Ok(Some(data)) |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | fn example_name(example: &str) -> String { |
no outgoing calls
no test coverage detected