(&self, config_text: &mut String)
| 63 | } |
| 64 | |
| 65 | pub fn write_to_config(&self, config_text: &mut String) -> Result<(), SshdConfigError> { |
| 66 | if self.keyword_info.is_repeatable { |
| 67 | if let Value::Array(arr) = self.value { |
| 68 | for item in arr { |
| 69 | let item = SshdConfigValue::try_new(self.key, item, Some(self.keyword_info.separator), self.use_quotes)?; |
| 70 | writeln!(config_text, "{} {item}", self.key)?; |
| 71 | } |
| 72 | } else { |
| 73 | writeln!(config_text, "{} {self}", self.key)?; |
| 74 | } |
| 75 | } else { |
| 76 | writeln!(config_text, "{} {self}", self.key)?; |
| 77 | } |
| 78 | Ok(()) |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | impl fmt::Display for SshdConfigValue<'_> { |
no outgoing calls
no test coverage detected