Skip to content

Commit 04ab55d

Browse files
committed
fmt: Use the same rustfmt.toml everywhere
It isn't worth keeping a separate rustfmt.toml only for ctest, so switch to using the vertical formatting everywhere.
1 parent ce5dc81 commit 04ab55d

28 files changed

+229
-52
lines changed

src/rustfmt.toml renamed to .rustfmt.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# Note that there is a separate top-level configuration for everything else
21
edition = "2021"
32
error_on_line_overflow = true
43
group_imports = "StdExternalCrate"

build.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
use std::process::{Command, Output};
2-
use std::{env, str};
1+
use std::process::{
2+
Command,
3+
Output,
4+
};
5+
use std::{
6+
env,
7+
str,
8+
};
39

410
// List of cfgs this build script is allowed to set. The list is needed to support check-cfg, as we
511
// need to know all the possible cfgs that this script will set. If you need to set another cfg

ci/ios/deploy_and_run_on_ios_simulator.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,17 @@
66
// (https://github.com/snipsco/dinghy): cargo dinghy install, then cargo dinghy
77
// test.
88

9-
use std::fs::{self, File};
9+
use std::fs::{
10+
self,
11+
File,
12+
};
1013
use std::io::Write;
1114
use std::path::Path;
1215
use std::process::Command;
13-
use std::{env, process};
16+
use std::{
17+
env,
18+
process,
19+
};
1420

1521
macro_rules! t {
1622
($e:expr) => {

ci/runtest-android.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
use std::env;
2-
use std::path::{Path, PathBuf};
2+
use std::path::{
3+
Path,
4+
PathBuf,
5+
};
36
use std::process::Command;
47

58
fn main() {

ctest-test/src/t1.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
#![allow(dead_code)]
22

3-
use std::ffi::{c_char, c_double, c_int, c_long, c_uint, c_void};
3+
use std::ffi::{
4+
c_char,
5+
c_double,
6+
c_int,
7+
c_long,
8+
c_uint,
9+
c_void,
10+
};
411

512
pub type T1Foo = i32;
613
pub const T1S: *const c_char = b"foo\0".as_ptr().cast();

ctest-test/src/t2.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
#![allow(non_camel_case_types)]
22

3-
use std::ffi::{c_char, c_int};
3+
use std::ffi::{
4+
c_char,
5+
c_int,
6+
};
47

58
pub type T2Foo = u32;
69
pub type T2Bar = u32;

ctest-test/tests/all.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33

44
use std::collections::HashSet;
55
use std::env;
6-
use std::process::{Command, ExitStatus};
6+
use std::process::{
7+
Command,
8+
ExitStatus,
9+
};
710

811
/// Create a command that starts in the `target/debug` or `target/release` directory.
912
fn cmd(name: &str) -> Command {

ctest/src/ast/function.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
use crate::{Abi, BoxStr, Parameter};
1+
use crate::{
2+
Abi,
3+
BoxStr,
4+
Parameter,
5+
};
26

37
/// Represents a function signature defined in Rust.
48
///

ctest/src/ast/static_variable.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use crate::{Abi, BoxStr};
1+
use crate::{
2+
Abi,
3+
BoxStr,
4+
};
25

36
/// Represents a static variable in Rust.
47
///

ctest/src/ast/structure.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use crate::{BoxStr, Field};
1+
use crate::{
2+
BoxStr,
3+
Field,
4+
};
25

36
/// Represents a struct defined in Rust.
47
#[derive(Debug, Clone)]

0 commit comments

Comments
 (0)