We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ab3752d commit 37ae354Copy full SHA for 37ae354
CHANGELOG.md
@@ -7,7 +7,21 @@
7
### New features
8
9
- `Sexp` now has `.is_scalar_na()`, which returns `true` if the SEXP is a length-1 of
10
- vector containing `NA` (#391).
+ vector containing `NA`. This is useful when you want to let your function accept
11
+ `NA` in addition to a typed vector (#391).
12
+
13
+ ```rs
14
+ #[savvy]
15
+ fn some_func_handling_double(x: savvy::Sexp) -> savvy::Result<savvy::Sexp> {
16
+ if x.is_scalar_na() {
17
+ // treat NA
18
+ }
19
20
+ let x_real: RealSexp = x.try_into()?;
21
22
+ ...
23
24
+ ```
25
26
## [v0.8.12] (2025-07-20)
27
0 commit comments