Format Rust code using rustfmt

This commit is contained in:
github-actions[bot]
2020-04-18 15:58:30 +00:00
committed by GitHub
parent 9a5c4df2b1
commit cba6c16414
18 changed files with 956 additions and 394 deletions

View File

@@ -25,13 +25,20 @@ impl ToString for Variable {
fn test_variable_from_string() {
assert_eq!(
Variable::from("VAR a\n42".to_string()),
Variable { id: "a".to_string(), initial_value: "42".to_string()}
Variable {
id: "a".to_string(),
initial_value: "42".to_string()
}
);
}
#[test]
fn test_variable_to_string() {
let output = Variable { id: "c".to_string(), initial_value: "57".to_string() }.to_string();
let output = Variable {
id: "c".to_string(),
initial_value: "57".to_string(),
}
.to_string();
let expected = "VAR c\n57".to_string();
assert_eq!(output, expected);
}