Skip to content

Remove deprecated GenericArray::from_slice usage #2046

@iduartgomez

Description

@iduartgomez

Description

The codebase currently has multiple instances of GenericArray::from_slice which is deprecated. These usages are currently suppressed with #[allow(deprecated)] attributes.

Affected Files

  1. crates/core/src/transport/packet_data.rs

    • Line 85, 87, 278, 300
    • Module-level #[allow(deprecated)] at line 4
    • Function-level attributes at lines 77, 152, 277, 299
  2. crates/core/src/contract/executor/runtime.rs

    • Lines 379, 381, 669, 671
    • Block-level #[allow(deprecated)] at lines 374, 664
  3. crates/core/src/config/secret.rs

    • Line 160
    • Module-level and impl-level #[allow(deprecated)] at lines 3, 151
  4. apps/freenet-email-app/web/src/inbox.rs

    • Lines 217, 219

Task

Replace all deprecated GenericArray::from_slice calls with the recommended alternative (likely using Array::from_slice or similar from the hybrid-array crate or the newer API).

Acceptance Criteria

  • All GenericArray::from_slice usages replaced with non-deprecated alternative
  • All #[allow(deprecated)] attributes related to GenericArray removed
  • Code compiles without deprecation warnings
  • All tests pass

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-contractsArea: Contract runtime, SDK, and executionA-cryptoArea: cryptographyA-developer-xpArea: developer experienceE-easyExperience needed to fix/implement: Easy / not muchT-enhancementType: Improvement to existing functionality

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions