From 0567b59f0b9b2415d5a9d4845a09bdddd2d0a7d1 Mon Sep 17 00:00:00 2001 From: Trevor Gross Date: Tue, 17 Dec 2024 21:29:10 +0000 Subject: [PATCH] Ignore ordering style for `c_char` (backport ) (cherry picked from commit c33744ea5af50e876fb4ed954178a1f82d42308b) --- ci/style.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ci/style.rs b/ci/style.rs index f5aeabcc71b5..cad08f2eecc8 100644 --- a/ci/style.rs +++ b/ci/style.rs @@ -28,10 +28,9 @@ //! * alignment //! * leading colons on paths -use std::env; -use std::fs; use std::io::prelude::*; use std::path::Path; +use std::{env, fs}; macro_rules! t { ($e:expr) => { @@ -130,7 +129,7 @@ fn check_style(file: &str, path: &Path, err: &mut Errors) { let line = if is_pub { &line[4..] } else { line }; let line_state = if line.starts_with("use ") { - if line.contains("c_void") { + if line.contains("c_void") || line.contains("c_char") { continue; } if is_pub {