<commit_before>extern crate iron;

use std::io::net::ip::Ipv4Addr;

use iron::{Iron, Ingot, Furnace, Alloy, Request, Response, ServerT};
use iron::ingot::{Status, Continue};

#[deriving(Clone)]
struct HelloWorld;

impl<Rq: Request, Rs: Response> Ingot<Rq, Rs> for HelloWorld {
    fn enter(&mut self, _request: &mut Rq, response: &mut Rs, _alloy: &mut Alloy) -> Status {
        let _ = response.write(bytes!("Hello World!"));
        Continue
    }
}

fn main() {
    let mut server: ServerT = Iron::new();
    server.smelt(HelloWorld);
    server.listen(Ipv4Addr(127, 0, 0, 1), 3000);
}
<commit_msg>(cleanup) Refactored example to work with new API.<commit_after>extern crate iron;

use std::io::net::ip::Ipv4Addr;

use iron::{Ingot, Iron, Alloy, Request, Response, ServerT};
use iron::ingot::{Status, Continue};

#[deriving(Clone)]
struct HelloWorld;

impl Ingot for HelloWorld {
    fn enter(&mut self,
             _request: &mut Request,
             response: &mut Response,
             _alloy: &mut Alloy) -> Status {
        let _ = response.write(bytes!("Hello World!"));
        Continue
    }
}

fn main() {
    let mut server: ServerT = Iron::new();
    server.smelt(HelloWorld);
    server.listen(Ipv4Addr(127, 0, 0, 1), 3000);
}

{'fraction_non_alphanumeric': 0.15582329317269075, 'fraction_numerical': 0.01927710843373494, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3051228', 'n_tokens_mistral': 443, 'n_tokens_neox': 426, 'n_words': 116}