tonsky / tonsky/FiraCode

Add Rust code example

Open
#336 1 comment 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
82k
Forks
3.2k
PR merge metrics
No merged PRs in 30d

Description

Just a minor request: Rust also looks beautiful with these ligatures, so why not add it as an example?

use std::fmt::{Display, Formatter, Result};

#[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Clone)]
struct Point {
    x: u32,
    y: u32,
}

impl Display for Point {
    fn fmt(&self, f: &mut Formatter) -> Result {
        write!(f, "({}, {})", self.x, self.y)
    }
}

it showcases the following ligatures in particular: #[, ::, ->

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 provides a Rust code example that showcases the #[, ::, and -> ligatures. Start by locating the repository's existing code examples and add the supplied Rust example in the corresponding location. Done means the example is included and renders with the requested ligatures.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.