Rust traits, impl blocks, and derive

F-DERIVE-V4-2medium

Customize a kit

A model-kit shop lists kits by size, customizes kits from a template and ranks kits largest first.

What needs to change

Repair customize so customizing a kit leaves the template as it was.

Reproduce

  1. Compile with rustc --edition=2024 main.rs -o main, pipe the sample template and extras into ./main and compare each parts line.

Acceptance criteria

Your review marks · Saved in this browser. Test acceptance is tracked separately.

Notes

The file contains its imports, read_lines, the Kit struct and the complete main.

Input: a nonempty template of up to 50 whitespace-separated part tokens on the first line, then up to 50 nonempty extra-part labels, one complete trimmed label per line. The supplied reader receives valid UTF-8 data.

Sign in to open this exercise

The ticket brief is public. Sign in to access the exercise. Paid exercises require Pro.

Sign in