git.delta.rocks / jrsonnet / refs/commits / cff8f6ac38ac

difftreelog

style fix clippy warnings

Yaroslav Bolyukin2021-11-27parent: #b118a83.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/builtin/manifest.rsdiffbeforeafterboth
189 string.starts_with(' ') || string.ends_with(' ')189 string.starts_with(' ') || string.ends_with(' ')
190 }190 }
191191
192 string == ""192 string.is_empty()
193 || need_quotes_spaces(string)193 || need_quotes_spaces(string)
194 || string.starts_with(|character: char| match character {194 || string.starts_with(|c| matches!(c, '&' | '*' | '?' | '|' | '-' | '<' | '>' | '=' | '!' | '%' | '@'))
195 '&' | '*' | '?' | '|' | '-' | '<' | '>' | '=' | '!' | '%' | '@' => true,
196 _ => false,
197 }) || string.contains(|character: char| match character {195 || string.contains(|c| matches!(c, ':' | '{' | '}' | '[' | ']' | ',' | '#' | '`' | '\"' | '\'' | '\\' | '\0'..='\x06' | '\t' | '\n' | '\r' | '\x0e'..='\x1a' | '\x1c'..='\x1f'))
198 ':'
199 | '{'
200 | '}'
201 | '['
202 | ']'
203 | ','
204 | '#'
205 | '`'
206 | '\"'
207 | '\''
208 | '\\'
209 | '\0'..='\x06'
210 | '\t'
211 | '\n'
212 | '\r'
213 | '\x0e'..='\x1a'
214 | '\x1c'..='\x1f' => true,
215 _ => false,
216 }) || [196 || [
217 // http://yaml.org/type/bool.html197 // http://yaml.org/type/bool.html
218 // Note: 'y', 'Y', 'n', 'N', is not quoted deliberately, as in libyaml. PyYAML also parse198 // Note: 'y', 'Y', 'n', 'N', is not quoted deliberately, as in libyaml. PyYAML also parse
219 // them as string, not booleans, although it is violating the YAML 1.1 specification.199 // them as string, not booleans, although it is violating the YAML 1.1 specification.
262 buf.push_str(options.padding);241 buf.push_str(options.padding);
263 buf.push_str(line);242 buf.push_str(line);
264 }243 }
265 } else if !options.quote_keys && !yaml_needs_quotes(&s) {244 } else if !options.quote_keys && !yaml_needs_quotes(s) {
266 buf.push_str(&s);245 buf.push_str(s);
267 } else {246 } else {
268 escape_string_json_buf(s, buf);247 escape_string_json_buf(s, buf);
269 }248 }
311 buf.push('\n');290 buf.push('\n');
312 buf.push_str(cur_padding);291 buf.push_str(cur_padding);
313 }292 }
314 if !options.quote_keys && !yaml_needs_quotes(&key) {293 if !options.quote_keys && !yaml_needs_quotes(key) {
315 buf.push_str(&key);294 buf.push_str(key);
316 } else {295 } else {
317 escape_string_json_buf(key, buf);296 escape_string_json_buf(key, buf);
318 }297 }