<commit_before>use std::os;
use std::io;
use std::io::fs::File;
use std::path::Path;

fn copy_to_stdout(f: &mut std::io::Reader) {
    let mut buf = [0u8, ..1024];
    let mut out = io::stdout();
    while !f.eof() {
        let len = f.read(buf);
        if len.is_some() {
            out.write(buf.slice(0, len.unwrap()))
        } else {
            break;
        }
    }
}

fn main() {
    match os::args() {
        [_] => {
            match io::result(|| {
                copy_to_stdout(& mut io::stdin() as &mut Reader);
            }) {
                Err(e) => {
                    if e.kind != io::EndOfFile {
                        io::stderr().write_line(format!("cat: stdin: {:s}", e.desc));
                    }
                }
                _ => {}
            }
        }
        [_, ..filenames] => {
            for fname in filenames.iter() {
                match io::result(|| {
                    let mut f = File::open(&Path::new(fname.as_slice()));
                    if f.is_none() {
                        return;
                    }
                    copy_to_stdout(f.get_mut_ref());
                }) {
                    Err(e) => {
                        io::stderr().write_line(format!("cat: {:s}: {:s}", *fname, e.desc));
                    }
                    _ => {}
                }
            }
        }
        _ => unreachable!()
    }
}<commit_msg>Remove unneeded space<commit_after>use std::os;
use std::io;
use std::io::fs::File;
use std::path::Path;

fn copy_to_stdout(f: &mut std::io::Reader) {
    let mut buf = [0u8, ..1024];
    let mut out = io::stdout();
    while !f.eof() {
        let len = f.read(buf);
        if len.is_some() {
            out.write(buf.slice(0, len.unwrap()))
        } else {
            break;
        }
    }
}

fn main() {
    match os::args() {
        [_] => {
            match io::result(|| {
                copy_to_stdout(&mut io::stdin() as &mut Reader);
            }) {
                Err(e) => {
                    if e.kind != io::EndOfFile {
                        io::stderr().write_line(format!("cat: stdin: {:s}", e.desc));
                    }
                }
                _ => {}
            }
        }
        [_, ..filenames] => {
            for fname in filenames.iter() {
                match io::result(|| {
                    let mut f = File::open(&Path::new(fname.as_slice()));
                    if f.is_none() {
                        return;
                    }
                    copy_to_stdout(f.get_mut_ref());
                }) {
                    Err(e) => {
                        io::stderr().write_line(format!("cat: {:s}: {:s}", *fname, e.desc));
                    }
                    _ => {}
                }
            }
        }
        _ => unreachable!()
    }
}
{'fraction_non_alphanumeric': 0.16566795911173776, 'fraction_numerical': 0.004934790271413465, 'mean_word_length': 1.050578034682081, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1701810', 'n_tokens_mistral': 893, 'n_tokens_neox': 842, 'n_words': 149}