Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

Add Cargo tips #42

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Add Cargo tips #42

wants to merge 3 commits into from

Conversation

ELD
Copy link

@ELD ELD commented Sep 5, 2023

No description provided.

@netlify
Copy link

netlify bot commented Sep 5, 2023

Deploy Preview for configtips ready!

Name Link
🔨 Latest commit 6ff3673
🔍 Latest deploy log https://app.netlify.com/sites/configtips/deploys/64fb55dc70038d000875d344
😎 Deploy Preview https://deploy-preview-42--configtips.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ELD ELD force-pushed the cargo-tips branch 2 times, most recently from 4960616 to a7276b0 Compare September 6, 2023 01:01
tailwind.config.cjs Outdated Show resolved Hide resolved
@ELD ELD force-pushed the cargo-tips branch 2 times, most recently from f0b9a23 to 6404bf0 Compare September 6, 2023 16:53
@ELD ELD marked this pull request as ready for review September 6, 2023 16:57
Copy link
Contributor

@KyleTryon KyleTryon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Left a suggestion, a question, and my last request is to run pnpm run format to appease the tests.

@@ -0,0 +1,30 @@
---
name: .cargo/config.toml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the name, Let's call this Cargo? Or Cargo Config? Would something like that work?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh i missed how there are two very similar kinds. But I notice they both have the same filepath in their kinds? Should these maybe be one type? I don't know much about rust/cargo

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue I found here is that project configuration is in a Cargo.toml file in the root of the project.

The actual configuration for the Cargo utility is in a .cargo/config.toml file and the two are exclusive, i.e. you can't mix configuration options in a Cargo.toml that belong in a .cargo/config.toml. So, I built two separate collections since it seemed like we were keying off the file name or configuration type.

Happy to rethink the way we're presenting Rust, though!

// Custom render lists in the body
renderer.list = (body, ordered) => {
const type = ordered ? 'ol' : 'ul';
const className = ordered ? 'list-decimal' : 'list-disc';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably text-left lists too.

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll fix this up in #48 since it deals with that change (this PR is rebased on top of that branch)

Eric Dattore added 3 commits September 8, 2023 11:03
- Set the list style type based on whether the list is ordered or
  unordered
- Set list-style-position to inside to avoid weird layouts when text is
  centered
Tips for both the Cargo project configuration and the configuration of
the Cargo build tool, itself
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants