Skip to content

writeln! documentation should tell what kind of newline is used #34697

@glandium

Description

@glandium
Contributor

As I was using writeln! to fill an in-memory buffer for data that explicitly wants a specific type of newlines (LF, fortunately), and I was wondering whether writeln! would always use LF, or would use the type of newline relevant to the platform (essentially, LF on Unix, CR/LF on Windows), and couldn't find the answer in https://doc.rust-lang.org/std/macro.writeln!.html.

(I got my answer on IRC, it's always LF)

There may be other places where such information is relevant (println! comes to mind).

Cc: @steveklabnik

Activity

GuillaumeGomez

GuillaumeGomez commented on Jul 7, 2016

@GuillaumeGomez
Member

@glandium: Sure, want to add it? :)

glandium

glandium commented on Jul 8, 2016

@glandium
ContributorAuthor

I would, if I knew whether there are other places that would benefit from this information as well.

GuillaumeGomez

GuillaumeGomez commented on Jul 8, 2016

@GuillaumeGomez
Member

Except for writeln! and println!, I don't see any places... You can already add it to these docs and if another function/macro needs it, then we'll add it.

added a commit that references this issue on Jul 12, 2016
4bfaa43
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

        @glandium@GuillaumeGomez@apasel422

        Issue actions

          writeln! documentation should tell what kind of newline is used · Issue #34697 · rust-lang/rust