cucumber
cucumber copied to clipboard
Rustfmt everything
Before actually showing the code to anyone, it needs to be rustfmt'd. Yeah, I hate four spaces (among other things), but its gotta be done.
Update on this:
So i've been "informally" rustfmting stuff. The project configuration this project follows here, specifies two spaces, which I'm OK with. However, I've noticed that this causes the step definitions to indent really strangely. Heres two steps:
Given!(c, "^a project$", |_, world: &mut CucumberWorld, _| {
match fs::create_project() {
Ok(current_project) => {
world.current_project = Some(current_project);
},
Err(ref err) => panic!("Failed to create project {}", err),
}
});
Given!(c,
"^a project if I don't already have one$",
|cuke: &Cucumber<CucumberWorld>, world: &mut CucumberWorld, _| {
match world.current_project {
None => cuke.invoke("a project", world, None),
_ => {},
}
});
The first output is preferred, but either may come out of rustfmt. It turns out if the given line is too long, it gets staggered like so. Unsure if i want to just disable rustfmt in step definitions or something else.