Closed Bug 1657112 Opened 6 years ago Closed 6 years ago

Make Rust documentation more consistent

Categories

(Data Platform and Tools :: Glean: SDK, task, P1)

task

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: brizental)

References

(Blocks 1 open bug)

Details

(Whiteboard: [telemetry:glean-rs:backlog][docdays])

Attachments

(1 external file)

We're mostly using a level-2 header (##) in doc comments in the Rust code
This is for things like Return value, Arguments and so on.

This is the exact opposite of what the Rust libstd does.
It's also noted in the API guidelines (an old thing that's not fully maintained anymore I think) and this RFC uses level-1 header: RFC 1574.

We also sometimes use Return value, sometimes Returns.

We should make this all consistent:

  • Use level-1 headers
  • Use # Returns
  • Don't repeat types in comments, that's what the function declaration is for.
  • Check for consistent phrasing of arguments and return values
  • A single-line function description, followed by an empty line, followed by more details if necessary.
Type: defect → task
Whiteboard: [telemetry:glean-rs:m?][docdays] → [telemetry:glean-rs:backlog][docdays]
Assignee: nobody → brizental
Priority: P3 → P1
Blocks: 1660550
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: