Skip to content

Commit 5b14b89

Browse files
committed
Format files that were previously not being checked in CI
1 parent 1187328 commit 5b14b89

File tree

10 files changed

+34
-30
lines changed

10 files changed

+34
-30
lines changed

ctest-next/src/ffi_items.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
use std::ops::Deref;
22

3-
use syn::{punctuated::Punctuated, visit::Visit};
3+
use syn::punctuated::Punctuated;
4+
use syn::visit::Visit;
45

56
use crate::{Abi, Const, Field, Fn, Parameter, Static, Struct, Type, Union};
67

ctest-next/src/generator.rs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,16 @@
1-
use std::{
2-
env,
3-
fs::File,
4-
io::Write,
5-
path::{Path, PathBuf},
6-
};
1+
use std::env;
2+
use std::fs::File;
3+
use std::io::Write;
4+
use std::path::{Path, PathBuf};
75

86
use askama::Template;
97
use syn::visit::Visit;
108
use thiserror::Error;
119

10+
use crate::ffi_items::FfiItems;
11+
use crate::template::{CTestTemplate, RustTestTemplate};
1212
use crate::{
13-
expand,
14-
ffi_items::FfiItems,
15-
template::{CTestTemplate, RustTestTemplate},
16-
Const, Field, MapInput, Parameter, Result, Static, Struct, Type, VolatileItemKind,
13+
expand, Const, Field, MapInput, Parameter, Result, Static, Struct, Type, VolatileItemKind,
1714
};
1815

1916
/// A function that takes a mappable input and returns its mapping as Some, otherwise

ctest-next/src/macro_expansion.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
use std::{env, fs::canonicalize, path::Path, process::Command};
1+
use std::env;
2+
use std::fs::canonicalize;
3+
use std::path::Path;
4+
use std::process::Command;
25

36
use crate::Result;
47

ctest-next/src/runner.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
use crate::{Result, TestGenerator};
21
use std::env;
32
use std::fs::{canonicalize, File};
43
use std::io::Write;
54
use std::path::{Path, PathBuf};
65
use std::process::Command;
76

7+
use crate::{Result, TestGenerator};
8+
89
/// Generate all tests for the given crate and output the Rust side to a file.
910
#[doc(hidden)]
1011
pub fn generate_test(

ctest-next/src/template.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
use askama::Template;
22
use quote::ToTokens;
33

4-
use crate::{
5-
ffi_items::FfiItems, generator::GenerationError, translator::Translator, MapInput, Result,
6-
TestGenerator,
7-
};
4+
use crate::ffi_items::FfiItems;
5+
use crate::generator::GenerationError;
6+
use crate::translator::Translator;
7+
use crate::{MapInput, Result, TestGenerator};
88

99
/// Represents the Rust side of the generated testing suite.
1010
#[derive(Template, Clone)]

ctest-next/src/tests.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
use crate::{ffi_items::FfiItems, translator::Translator, Result, TranslationError};
2-
31
use syn::visit::Visit;
42

3+
use crate::ffi_items::FfiItems;
4+
use crate::translator::Translator;
5+
use crate::{Result, TranslationError};
6+
57
const ALL_ITEMS: &str = r#"
68
use std::os::raw::c_void;
79

ctest-next/src/translator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
//!
33
//! Simple to semi complex types are supported only.
44
5-
use std::{fmt, ops::Deref};
5+
use std::fmt;
6+
use std::ops::Deref;
67

78
use proc_macro2::Span;
89
use quote::ToTokens;

ctest-next/tests/basic.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
1-
use std::{
2-
env, fs,
3-
path::{Path, PathBuf},
4-
};
5-
6-
use pretty_assertions::assert_eq;
1+
use std::path::{Path, PathBuf};
2+
use std::{env, fs};
73

84
use ctest_next::{Result, TestGenerator, __compile_test, __run_test, generate_test};
5+
use pretty_assertions::assert_eq;
96

107
// Headers are found relevative to the include directory, all files are generated
118
// relative to the output directory.

libc-test/build.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2849,8 +2849,7 @@ fn test_freebsd(target: &str) {
28492849
"splice" if Some(14) > freebsd_ver => true,
28502850

28512851
// Those are introduced in FreeBSD 15.
2852-
"xktls_session_onedir" | "xktls_session"
2853-
if Some(15) > freebsd_ver => true,
2852+
"xktls_session_onedir" | "xktls_session" if Some(15) > freebsd_ver => true,
28542853

28552854
_ => false,
28562855
}

src/unix/linux_like/linux/musl/b64/powerpc64.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,11 @@ s! {
9595
}
9696

9797
pub const MADV_SOFT_OFFLINE: c_int = 101;
98-
#[deprecated(since = "0.2.175", note = "Linux does not define MAP_32BIT on any architectures \
99-
other than x86 and x86_64, this constant will be removed in the future")]
98+
#[deprecated(
99+
since = "0.2.175",
100+
note = "Linux does not define MAP_32BIT on any architectures \
101+
other than x86 and x86_64, this constant will be removed in the future"
102+
)]
100103
pub const MAP_32BIT: c_int = 0x0040;
101104
pub const O_APPEND: c_int = 1024;
102105
pub const O_DIRECT: c_int = 0x20000;

0 commit comments

Comments
 (0)