<commit_before>import React from 'react';

import * as actions from './actions';
import Example from './HelpExample';
import Link from './uss-router/Link';

import styles from './Help.module.css';

import integer32Logo from './assets/integer32-logo.svg';

const ACE_URL = 'https://github.com/ajaxorg/ace';
const CLIPPY_URL = 'https://github.com/Manishearth/rust-clippy';
const MIRI_URL = 'https://github.com/rust-lang/miri';
const CRATES_IO_URL = 'https://crates.io/';
const RUST_COOKBOOK_URL = 'https://rust-lang-nursery.github.io/rust-cookbook/';
const CRATES_URL = 'https://github.com/integer32llc/rust-playground/blob/master/compiler/base/Cargo.toml';
const GIST_URL = 'https://gist.github.com/';
const I32_URL = 'http://integer32.com/';
const LOCALSTORAGE_URL = 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API';
const ORIGINAL_PLAYGROUND_URL = 'https://github.com/rust-lang/rust-playpen';
const REPO_URL = 'https://github.com/integer32llc/rust-playground';
const RUSTFMT_URL = 'https://github.com/rust-lang-nursery/rustfmt';
const SHEPMASTER_URL = 'https://github.com/shepmaster/';

const CRATE_EXAMPLE = `extern crate rand;
use rand::Rng;

fn main() {
    let mut rng = rand::thread_rng();
    println!("{}", rng.gen::<u8>());
}`;

const CLIPPY_EXAMPLE = `fn main() {
    match true {
        true => println!("true"),
        false => println!("false"),
    }
}`;

const MIRI_EXAMPLE = `fn main() {
    let mut a: [u8; 0] = [];
    unsafe {
        *a.get_unchecked_mut(1) = 1;
    }
}`;

const RUSTFMT_EXAMPLE = `// wow, this is ugly!
fn main ()
{ struct Foo { a: u8, b: String, }
match 4 {2=>{},_=>{}} }`;

const LINK_EXAMPLE = 'https://play.integer32.com/?code=fn main() { println!("hello world!"); }';

const TEST_EXAMPLE = `#[test]
fn test_something() {
    assert_ne!(42, 0);
}`;

const LIBRARY_EXAMPLE = `#![crate_type="lib"]

pub fn library_fn() -> u8 {
    42
}`;

const OUTPUT_EXAMPLE = `#[inline(never)]
pub fn a_loop() -> i32 {
    let mut sum = 0;
    for i in 0..100 {
        sum += i;
    }
    sum
}

fn main() {
    println!("{}", a_loop());
}`;

const Help: React.SFC = () => {
  return (
    <section className={`help ${styles.container}`}>
      <h1>The Rust Playground</h1>
      <Link action={actions.navigateToIndex}>Return to the playground</Link>

      <LinkableSection id="about" header="About" level={H2}>
        <p>
          The playground is an <a href={REPO_URL}>open source project</a>.
          If you have any suggestions for features, issues with the
          implementation, or just want to read the code for yourself,
          you are invited to participate!
        </p>

        <p>
          This playground is modeled after the <a href={ORIGINAL_PLAYGROUND_URL}>original
        Rust playground</a>, and we owe a great debt to every contributor to
                                      that project.
        </p>

        <p>
          This playground was created by <a href={SHEPMASTER_URL}><NAME></a>,
        part of <a href={I32_URL}>Integer 32</a>.
        </p><commit_msg>Remove unused CSS class<commit_after>import React from 'react';

import * as actions from './actions';
import Example from './HelpExample';
import Link from './uss-router/Link';

import styles from './Help.module.css';

import integer32Logo from './assets/integer32-logo.svg';

const ACE_URL = 'https://github.com/ajaxorg/ace';
const CLIPPY_URL = 'https://github.com/Manishearth/rust-clippy';
const MIRI_URL = 'https://github.com/rust-lang/miri';
const CRATES_IO_URL = 'https://crates.io/';
const RUST_COOKBOOK_URL = 'https://rust-lang-nursery.github.io/rust-cookbook/';
const CRATES_URL = 'https://github.com/integer32llc/rust-playground/blob/master/compiler/base/Cargo.toml';
const GIST_URL = 'https://gist.github.com/';
const I32_URL = 'http://integer32.com/';
const LOCALSTORAGE_URL = 'https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API';
const ORIGINAL_PLAYGROUND_URL = 'https://github.com/rust-lang/rust-playpen';
const REPO_URL = 'https://github.com/integer32llc/rust-playground';
const RUSTFMT_URL = 'https://github.com/rust-lang-nursery/rustfmt';
const SHEPMASTER_URL = 'https://github.com/shepmaster/';

const CRATE_EXAMPLE = `extern crate rand;
use rand::Rng;

fn main() {
    let mut rng = rand::thread_rng();
    println!("{}", rng.gen::<u8>());
}`;

const CLIPPY_EXAMPLE = `fn main() {
    match true {
        true => println!("true"),
        false => println!("false"),
    }
}`;

const MIRI_EXAMPLE = `fn main() {
    let mut a: [u8; 0] = [];
    unsafe {
        *a.get_unchecked_mut(1) = 1;
    }
}`;

const RUSTFMT_EXAMPLE = `// wow, this is ugly!
fn main ()
{ struct Foo { a: u8, b: String, }
match 4 {2=>{},_=>{}} }`;

const LINK_EXAMPLE = 'https://play.integer32.com/?code=fn main() { println!("hello world!"); }';

const TEST_EXAMPLE = `#[test]
fn test_something() {
    assert_ne!(42, 0);
}`;

const LIBRARY_EXAMPLE = `#![crate_type="lib"]

pub fn library_fn() -> u8 {
    42
}`;

const OUTPUT_EXAMPLE = `#[inline(never)]
pub fn a_loop() -> i32 {
    let mut sum = 0;
    for i in 0..100 {
        sum += i;
    }
    sum
}

fn main() {
    println!("{}", a_loop());
}`;

const Help: React.SFC = () => {
  return (
    <section className={styles.container}>
      <h1>The Rust Playground</h1>
      <Link action={actions.navigateToIndex}>Return to the playground</Link>

      <LinkableSection id="about" header="About" level={H2}>
        <p>
          The playground is an <a href={REPO_URL}>open source project</a>.
          If you have any suggestions for features, issues with the
          implementation, or just want to read the code for yourself,
          you are invited to participate!
        </p>

        <p>
          This playground is modeled after the <a href={ORIGINAL_PLAYGROUND_URL}>original
        Rust playground</a>, and we owe a great debt to every contributor to
                                      that project.
        </p>

        <p>
          This playground was created by <a href={SHEPMASTER_URL}><NAME></a>,
        part of <a href={I32_URL}>Integer 32</a>.
        </p>
{'fraction_non_alphanumeric': 0.16344262295081968, 'fraction_numerical': 0.01377049180327869, 'mean_word_length': 3.1084175084175083, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 61, 'https://': 26, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2841819', 'n_tokens_mistral': 2199, 'n_tokens_neox': 2117, 'n_words': 507}