deprecate `as_slice` and `as_mut_slice`?

Geschlossen
#736 9 Kommentare 2 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@Ankit-cs arbeitet bereits daran.

Seit 07.10.2026.

  • #763 von @Ankit-cs — gemerged

Bewertung

Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Anfängerfreundlichkeit
35/100
Issue-Typ
Refactoring
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
rust
Bereich
backend

Rechercherichtung

Start by reading the as_slice and as_mut_slice methods and the AsRef and AsMut implementations in the smallvec source. Check their call sites and tests to understand the impact of deprecating the methods; the issue is a request for comments, so the desired decision and what counts as done are not yet specified.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

good first issue help wanted r-refactor

as_slice and as_mut_slice are accessors to the underlying slice represented by the smallvec

idiomatic rust consistently prefers trait implementations, such as AsRef and AsMut to be used over bespoke helper methods

since we only implement AsRef<[T]> and AsMut<[T]>, and not other reference-to-reference conversions, calling as_ref and as_mut on a smallvec is unambiguous

request for comments

Vorherrschende Sprache
Rust
Sterne
1.8k
Forks
242
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus servo/rust-smallvec

Alle Issues in servo/rust-smallvec

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.