Problem
Running dx fmt --all-code the new lines that separate the top level blocks get deleted. It's not a critical issue but can be annoying.
use dioxus_logger::tracing;
fn main() {
dioxus_logger::init(tracing::Level::INFO).expect("failed to init logger");
tracing::info!("starting app");
launch(App);
}
fn App() -> Element {
//...
}
#[server(PostServerData)]
async fn post_server_data(data: String) -> Result<String, ServerFnError> {
//...
}
Steps To Reproduce
Steps to reproduce the behavior:
- Generate a new fullstack app
- Insure between the
main, App and post_server_data functions and the last use there is a new line
- Run
dx fmt --all-code
Expected behavior
The new line should stay between the functions like this
use dioxus_logger::tracing;
fn main() {
dioxus_logger::init(tracing::Level::INFO).expect("failed to init logger");
tracing::info!("starting app");
launch(App);
}
fn App() -> Element {
//...
}
#[server(PostServerData)]
async fn post_server_data(data: String) -> Result<String, ServerFnError> {
//...
}
Environment:
- Dioxus version: 0.5.7
- Rust version: 1.81
- OS info: MacOS Intel
- App platform: Fullstack
Questionnaire
Problem
Running
dx fmt --all-codethe new lines that separate the top level blocks get deleted. It's not a critical issue but can be annoying.Steps To Reproduce
Steps to reproduce the behavior:
main,Appandpost_server_datafunctions and the lastusethere is a new linedx fmt --all-codeExpected behavior
The new line should stay between the functions like this
Environment:
Questionnaire