daniellga / harmonium

Audio analysis and IO
https://daniellga.github.io/harmonium/
MIT License
3 stars 1 forks source link

Update savvy requirement from 0.6.8 to 0.7.2 in /r-harmonium/src/rust #34

Closed dependabot[bot] closed 1 week ago

dependabot[bot] commented 2 weeks ago

Updates the requirements on savvy to permit the latest version.

Changelog

Sourced from savvy's changelog.

[v0.7.2] (2024-10-27)

Minor Improvements

  • savvy now generates a reduced number of R functions.

  • savvy-cli now rejects a package name containing ..

[v0.7.1] (2024-10-21)

Bug fixes

  • NumericScalar::as_usize() and NumericSexp::iter_usize() now fail if the number is larger than 2^53 - 1 because this is the maximum number that can be safely converted to usize.

[v0.7.0] (2024-10-20)

Breaking Change

Removed TryFrom<Sexp> for usize, so the following code no longer compiles.

#[savvy]
fn foo(x: usize) -> savvy::Result<()> {
    ...
}

Instead, you can use i32 and convert it to usize by yourself. If you are sure the input number is never negative, you can just use the as conversion. If you are not sure, you should use <usize>::try_from() and handle the error by yourself. Also, please be aware you need to handle NA as well.

#[savvy]
fn foo(x: i32) -> savvy::Result<()> {
    if x.is_na() {
        return Err("cannot convert NA to usize".into())?;
    }
let x = &lt;usize&gt;::try_from(x).map_err(|e| e.to_string().into());

...

}

Alternatively, you can use newly-added methods, NumericScalar::as_usize() and NumericSexp::iter_usize(). What's good is that this can handle integer-ish numeric, which means you can allow users to input a larger number than the

... (truncated)

Commits


Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 1 week ago

Superseded by #35.