Skip to content

Refactor StatusList2021 to use String for credential index #4552

Refactor StatusList2021 to use String for credential index

Refactor StatusList2021 to use String for credential index #4552

Triggered via pull request November 12, 2024 10:39
Status Failure
Total duration 2m 54s
Artifacts

clippy.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

4 errors and 3 warnings
mismatched types: src/credential/revocation/status_list_2021/credential.rs#L135
error[E0308]: mismatched types --> src/credential/revocation/status_list_2021/credential.rs:135:49 | 135 | .set_credential_status(&mut credential.0, index, revoked_or_suspended) | --------------------- ^^^^^ expected `&str`, found `usize` | | | arguments to this method are incorrect | note: method defined here --> /home/runner/work/identity.rs/identity.rs/identity_credential/src/revocation/status_list_2021/credential.rs:128:10 | 128 | pub fn set_credential_status( | ^^^^^^^^^^^^^^^^^^^^^
the trait bound `std::string::String: std::convert::From<usize>` is not satisfied: src/credential/revocation/status_list_2021/entry.rs#L33
error[E0277]: the trait bound `std::string::String: std::convert::From<usize>` is not satisfied --> src/credential/revocation/status_list_2021/entry.rs:33:67 | 33 | Ok(Self(StatusList2021Entry::new(status_list, purpose.into(), index, id))) | ------------------------ ^^^^^ the trait `std::convert::From<usize>` is not implemented for `std::string::String`, which is required by `usize: std::convert::Into<std::string::String>` | | | required by a bound introduced by this call | = help: the following other types implement trait `std::convert::From<T>`: `std::string::String` implements `std::convert::From<&'a js_sys::JsString>` `std::string::String` implements `std::convert::From<&mut str>` `std::string::String` implements `std::convert::From<&std::string::String>` `std::string::String` implements `std::convert::From<&str>` `std::string::String` implements `std::convert::From<char>` `std::string::String` implements `std::convert::From<der::asn1::utf8_string::Utf8StringRef<'a>>` `std::string::String` implements `std::convert::From<identity_iota::core::Timestamp>` `std::string::String` implements `std::convert::From<identity_iota::credential::Jpt>` and 14 others = note: required for `usize` to implement `std::convert::Into<std::string::String>` note: required by a bound in `identity_iota::credential::status_list_2021::StatusList2021Entry::new` --> /home/runner/work/identity.rs/identity.rs/identity_credential/src/revocation/status_list_2021/entry.rs:69:68 | 69 | pub fn new(status_list: Url, purpose: StatusPurpose, index: impl Into<String>, id: Option<Url>) -> Self { | ^^^^^^^^^^^^ required by this bound in `StatusList2021Entry::new`
mismatched types: src/credential/revocation/status_list_2021/entry.rs#L51
error[E0308]: mismatched types --> src/credential/revocation/status_list_2021/entry.rs:51:5 | 50 | pub fn index(&self) -> usize { | ----- expected `usize` because of return type 51 | self.0.index() | ^^^^^^^^^^^^^^ expected `usize`, found `&str`
clippy
Clippy had exited with the 101 exit code
clippy
Your workflow is using a version of actions/cache that is scheduled for deprecation, actions/[email protected]. Please update your workflow to use the latest version of actions/cache to avoid interruptions. Learn more: https://github.blog/changelog/2024-09-16-notice-of-upcoming-deprecations-and-changes-in-github-actions-services/
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
clippy
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3, jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9, actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/