jasonwhite / jasonwhite/syscalls

Don't panic on From i32

Open
#51 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
141
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Previous discussed in #41 but closed w/o result.

https://doc.rust-lang.org/std/convert/trait.From.html says:

> **Note: This trait must not fail.** The From trait is intended for perfect conversions. If the conversion can fail or is not perfect, use [TryFrom](https://doc.rust-lang.org/std/convert/trait.TryFrom.html).

> […] the general expectation is that the conversions should typically be restricted as follows:
>
> - The conversion is infallible: if the conversion can fail, use [TryFrom](https://doc.rust-lang.org/std/convert/trait.TryFrom.html) instead; don’t provide a From impl that panics.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no source file, entry point, or test. Start by locating the From implementations in the repository and reviewing how their conversions behave; done means the relevant conversions no longer panic and their behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.