add new rustfmt.toml and reformat code

This commit is contained in:
2021-08-20 21:20:02 +02:00
parent dd1a68f714
commit bc70389346
14 changed files with 63 additions and 214 deletions
+1 -5
View File
@@ -63,11 +63,7 @@ pub fn to_file<P: AsRef<Path>>(data: &Data, path: P) -> Result<()> {
}
/// Attempts to serialize a Data struct to a file
pub fn to_file_with_options<P: AsRef<Path>>(
data: &Data,
path: P,
options: OpenOptions,
) -> Result<()> {
pub fn to_file_with_options<P: AsRef<Path>>(data: &Data, path: P, options: OpenOptions) -> Result<()> {
let path = path.as_ref();
let file = options.open(path)?;
to_writer(data, file)?;
+1 -5
View File
@@ -63,11 +63,7 @@ pub fn to_file<P: AsRef<Path>>(data: &Data, path: P) -> Result<()> {
}
/// Attempts to serialize a Data struct to a file
pub fn to_file_with_options<P: AsRef<Path>>(
data: &Data,
path: P,
options: OpenOptions,
) -> Result<()> {
pub fn to_file_with_options<P: AsRef<Path>>(data: &Data, path: P, options: OpenOptions) -> Result<()> {
let path = path.as_ref();
let file = options.open(path)?;
to_writer(data, file)?;