Skip to content

Code blocks for multiple files is confusing #38

Open
@MichalMichalak

Description

@MichalMichalak

It's just an opinion but, I think, the formula for showing multiple files in one code block makes it really confusing to read. It would be much better for multiple files to use multiple code blocks.

This is what we have now.

// 01. greetings/Cargo.toml to mark as a workspace and to add members
[workspace]
members = [
    "lib",
    "examples/hello"
]

// 02.1 greetings/lib/Cargo.toml to change the package name to greetings
[package]
name = "greetings"
version = "0.1.0"
authors = ["Dumindu Madunuwan"]

[dependencies]

It would be better like this.

greetings/Cargo.toml to mark as a workspace and to add members

[workspace]
members = [
    "lib",
    "examples/hello"
]

greetings/lib/Cargo.toml to change the package name to greetings

[package]
name = "greetings"
version = "0.1.0"
authors = ["Dumindu Madunuwan"]

[dependencies]

Activity

ghost

ghost commented on Oct 29, 2021

@ghost

I just stumbled upon this website and its very informative, much better than the official book. I agree its hard to know where a file starts and ends. Multiple codeblocks would definitely help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @MichalMichalak

        Issue actions

          Code blocks for multiple files is confusing · Issue #38 · learning-rust/learning-rust.github.io