From 8548c167be39c4d88981cfc4263b68076ded75d9 Mon Sep 17 00:00:00 2001 From: Geoffrey White <40627776+geoffw0@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:30:04 +0000 Subject: [PATCH] Rust: Autoformat. --- rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll | 9 +++------ .../rust/security/regex/RegexInjectionExtensions.qll | 3 ++- .../library-tests/elements/builtintypes/BuiltinTypes.ql | 6 +++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll index 56de2d97b6f..9269aff2bdc 100644 --- a/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll +++ b/rust/ql/lib/codeql/rust/frameworks/stdlib/Builtins.qll @@ -34,24 +34,21 @@ class BuiltinType extends Struct { /** * A numerical type, such as `i64`, `usize`, `f32` or `f64`. */ -abstract private class NumericTypeImpl extends BuiltinType { -} +abstract private class NumericTypeImpl extends BuiltinType { } final class NumericType = NumericTypeImpl; /** * An integral numerical type, such as `i64` or `usize`. */ -abstract private class IntegralTypeImpl extends NumericTypeImpl { -} +abstract private class IntegralTypeImpl extends NumericTypeImpl { } final class IntegralType = IntegralTypeImpl; /** * A floating-point numerical type, such as `f32` or `f64`. */ -abstract private class FloatingPointTypeImpl extends NumericTypeImpl { -} +abstract private class FloatingPointTypeImpl extends NumericTypeImpl { } final class FloatingPointType = FloatingPointTypeImpl; diff --git a/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll b/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll index 7e82bdd678a..750517708af 100644 --- a/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll +++ b/rust/ql/lib/codeql/rust/security/regex/RegexInjectionExtensions.qll @@ -96,5 +96,6 @@ module RegexInjection { * We don't include floating point types in this barrier, as `.` is a special character * in regular expressions. */ - private class IntegralOrBooleanTypeBarrier extends Barrier instanceof Barriers::IntegralOrBooleanTypeBarrier { } + private class IntegralOrBooleanTypeBarrier extends Barrier instanceof Barriers::IntegralOrBooleanTypeBarrier + { } } diff --git a/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.ql b/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.ql index a5a1a0a48e0..4da1117a3fb 100644 --- a/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.ql +++ b/rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.ql @@ -3,11 +3,11 @@ import codeql.rust.frameworks.stdlib.Builtins import codeql.rust.internal.Type string describe(BuiltinType t) { - (t instanceof NumericType and result = "NumericType") + t instanceof NumericType and result = "NumericType" or - (t instanceof IntegralType and result = "IntegralType") + t instanceof IntegralType and result = "IntegralType" or - (t instanceof FloatingPointType and result = "FloatingPointType") + t instanceof FloatingPointType and result = "FloatingPointType" } from BuiltinType t