You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/09/22 21:09:49 UTC
[GitHub] [arrow-datafusion] andygrove opened a new issue, #3591: Configure `cargo fmt` for consistent formatting of imports
andygrove opened a new issue, #3591:
URL: https://github.com/apache/arrow-datafusion/issues/3591
**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
Our imports are very inconsistent and are not currently formatted by `cargo fmt` other than reordering within groups.
**Describe the solution you'd like**
I would like to add a `rustfmt.toml` with these settings:
``` toml
merge_imports = true
group_imports = "StdExternalCrate"
```
Here is an example of imports formatted with this settings:
```
use std::{
collections::{HashMap, HashSet},
convert::TryFrom,
fmt::{Display, Formatter},
sync::Arc,
};
use arrow::{
compute::can_cast_types,
datatypes::{DataType, Field, Schema, SchemaRef},
};
use crate::{
error::{DataFusionError, Result, SchemaError},
field_not_found, Column,
};
```
To minimize disruption, we could do this one crate or module at a time.
**Describe alternatives you've considered**
None
**Additional context**
None
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org