Skip to content

Commit 9a4c899

Browse files
authored
ops: enforce Rust format check in CI (#667)
1 parent bd8690f commit 9a4c899

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

.github/workflows/CI.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,19 @@ permissions:
2626
contents: read
2727

2828
jobs:
29-
format-check:
29+
rust-format-check:
30+
name: Check Rust formatting
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: dtolnay/rust-toolchain@stable
35+
with:
36+
components: rustfmt
37+
- name: Check Rust formatting
38+
run: |
39+
cargo fmt --check
40+
41+
python-format-check:
3042
name: Check Python formatting
3143
runs-on: ubuntu-latest
3244
steps:

src/py/convert.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ fn basic_value_from_py_object<'py>(
136136
schema::BasicValueType::Float32 => value::BasicValue::Float32(v.extract::<f32>()?),
137137
schema::BasicValueType::Float64 => value::BasicValue::Float64(v.extract::<f64>()?),
138138
schema::BasicValueType::Range => value::BasicValue::Range(depythonize(v)?),
139-
schema::BasicValueType::Uuid => {
140-
value::BasicValue::Uuid(v.extract::<uuid::Uuid>()?)
141-
}
139+
schema::BasicValueType::Uuid => value::BasicValue::Uuid(v.extract::<uuid::Uuid>()?),
142140
schema::BasicValueType::Date => value::BasicValue::Date(v.extract::<chrono::NaiveDate>()?),
143141
schema::BasicValueType::Time => value::BasicValue::Time(v.extract::<chrono::NaiveTime>()?),
144142
schema::BasicValueType::LocalDateTime => {

0 commit comments

Comments
 (0)