Skip to content

Commit 28b410e

Browse files
chore: expand matches! comment and add maturin dev dep
1 parent eba270e commit 28b410e

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ dev = [
2525
"codespell>=2.4.2",
2626
"deptry>=0.25.1",
2727
"import-linter>=2.11",
28+
"maturin>=1.13.3",
2829
"prek>=0.3.13",
2930
"pyproject-fmt>=2.21.2",
3031
"pytest>=9.0.3",

src/ops.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@ impl PyOp {
9393
for (k, v) in dict.iter() {
9494
let key_str: String = k.extract()?;
9595
let val = py_to_yaml_value(&v)?;
96-
// matches! with wildcard patterns only inspects; no move occurs.
96+
// `matches!` with wildcard `_` patterns does not move `val`: the
97+
// expanded `match` only inspects the enum discriminant without
98+
// binding or destructuring inner data, so `val` remains owned and
99+
// usable in `map.insert` below.
97100
if matches!(
98101
val,
99102
serde_yaml::Value::Mapping(_) | serde_yaml::Value::Sequence(_)

uv.lock

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)