<commit_before>extern crate http;
extern crate iron;

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

use iron::{Iron, Chain, Alloy, Request, Response, ServerT};
use iron::mixin::Serve;
use iron::middleware::{Status, Continue};

fn hello_world(_req: &mut Request, res: &mut Response, _alloy: &mut Alloy) -> Status {
    let _ = res.serve(::http::status::Ok, "Hello, world!");
    Continue
}

fn main() {
    let mut server: ServerT = Iron::new();
    server.chain.link(hello_world);
    server.listen(Ipv4Addr(127, 0, 0, 1), 3000);
}
<commit_msg>(fix) Updated example to FromFn<commit_after>extern crate http;
extern crate iron;

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

use iron::{Iron, Chain, Alloy, Request, Response, ServerT};
use iron::mixin::Serve;
use iron::middleware::{Status, Continue, FromFn};

fn hello_world(_req: &mut Request, res: &mut Response, _alloy: &mut Alloy) -> Status {
    let _ = res.serve(::http::status::Ok, "Hello, world!");
    Continue
}

fn main() {
    let mut server: ServerT = Iron::new();
    server.chain.link(FromFn::new(hello_world));
    server.listen(Ipv4Addr(127, 0, 0, 1), 3000);
}

{'fraction_non_alphanumeric': 0.17529518619436876, 'fraction_numerical': 0.021798365122615803, 'mean_word_length': 5.191011235955056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3051229', 'n_tokens_mistral': 415, 'n_tokens_neox': 388, 'n_words': 103}