RustCrypto / RustCrypto/SSH

`decode_as` argument ordering

Open
#313 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
247
Forks
64
Avg merge
4d 7h
Merged PRs (30d)
4

Description

We have several decode_as methods which currently take a reader: &mut impl Reader, algorithm: Algorithm in that order. Most of these are unreleased outside of prereleases (KeypairData::decode_as is the only one in the stable public API).

I'm wondering if this ordering should be reversed so the algorithm comes first, and it reads as decode_as(algorithm, ... rather than decode_as(reader, ...

cc @baloo

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

Start by locating the several decode_as methods mentioned in the issue, including KeypairData::decode_as, and compare their current signatures and release status. Review the stable public API and prerelease variants before deciding whether the ordering should be consistent; done means the API direction is agreed and the affected methods are handled consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking, security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.