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

Code from docs are ill-formatted #260

Open
kracekumar opened this issue Nov 21, 2016 · 0 comments
Open

Code from docs are ill-formatted #260

kracekumar opened this issue Nov 21, 2016 · 0 comments

Comments

@kracekumar
Copy link

Clicking on the Run button from docs takes to play.rust-lang.org with the ill-formatted code snippet.

Here is how it looks

fn main() {
    let mut vec = Vec::new();
vec.push(1);
vec.push(2);

assert_eq!(vec.len(), 2);
assert_eq!(vec[0], 1);

assert_eq!(vec.pop(), Some(2));
assert_eq!(vec.len(), 1);

vec[0] = 7;
assert_eq!(vec[0], 7);

vec.extend([1, 2, 3].iter().cloned());

for x in &vec {
    println!("{}", x);
}
assert_eq!(vec, [7, 1, 2, 3]);
}

This is worse for fs:create_dir_all example.

fn main() {
    use std::fs;

fn foo() -> std::io::Result<()> {
try!(fs::create_dir_all("/some/dir"));
Ok(())
}
}

Link.

I am not sure the problem lies with generated docs or playground or with my browser/plugins.

I am using Chrome on Trisquel 7.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant