Skip to content

Replace into_inner() with into() for nutype domain types #245

@jwilger

Description

@jwilger

Background

Currently we call .into_inner() on nutype domain types when we need the wrapped primitive value. This is verbose and non-idiomatic. Rust's Into trait is the standard way to perform type conversions.

Changes

  1. Find all locations where .into_inner() is called on nutype types
  2. Implement Into<T> for each nutype domain type (BatchSize, StreamPosition, StreamVersion, etc.)
  3. Replace .into_inner() calls with .into()
  4. Ensure tests pass and code compiles

Example

// Current (verbose)
let size: usize = batch_size.into_inner();

// After (idiomatic)
let size: usize = batch_size.into();

Acceptance Criteria

  • Into<T> implemented for all nutype domain types
  • All .into_inner() calls replaced with .into()
  • Existing test suite passes unchanged
  • More idiomatic Rust code

Migrated from beads issue: eventcore-4i0

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreMaintenance (audits, cleanup)

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions