running 1 test
test tests::code_literal ... FAILED
failures:
---- tests::code_literal stdout ----
thread 'tests::code_literal' panicked at src/lib.rs:770:9:
assertion `left == right` failed
left: ">>> \nSure, here's a simple example of an HTTP proxy in Rust using the `hyper` and `tokio` crates:\n \n # Cargo.toml\n [package]\n name = \"http_proxy\"\n version = \"0.1.0\"\n edition = \"2018\"\n \n [dependencies]\n hyper = \"0.14\"\n tokio = { version = \"1\", features = [\"full\"] }\n FRED\n \n // src/main.rs\n use hyper::{Client, Request, Response, Body, Server};\n use hyper::service::{make_service_fn, service_fn};\n use std::convert::Infallible;\n use tokio::runtime::Runtime;\n \n async fn proxy(req: Request
) -> Result, hyper::Error> {\n let client = Client::new();\n client.request(req).await\n }\n \n #[tokio::main]\n async fn main() {\n let make_svc = make_service_fn(|_conn| {\n async {\n Ok::<_, Infallible>(service_fn(proxy))\n }\n });\n \n let addr = ([127, 0, 0, 1], 3000).into();\n let server = Server::bind(&addr).serve(make_svc);\n \n println!(\"Listening on http://{}\", addr);\n \n if let Err(e) = server.await {\n eprintln!(\"server error: {}\", e);\n }\n }\n \n To run this code, ensure you have Rust and Cargo installed, then create a new project, add the dependencies in `Cargo.toml`, and replace the contents of `src/main.rs` with the provided code.\n <<<"
right: ">>> \nSure, here's a simple example of an HTTP proxy in Rust using the `hyper` and `tokio` crates:\n \n # Cargo.toml\n [package]\n name = \"http_proxy\"\n version = \"0.1.0\"\n edition = \"2018\"\n \n [dependencies]\n hyper = \"0.14\"\n tokio = { version = \"1\", features = [\"full\"] }\n ${fred:=FRED}\n \n // src/main.rs\n use hyper::{Client, Request, Response, Body, Server};\n use hyper::service::{make_service_fn, service_fn};\n use std::convert::Infallible;\n use tokio::runtime::Runtime;\n \n async fn proxy(req: Request) -> Result, hyper::Error> {\n let client = Client::new();\n client.request(req).await\n }\n \n #[tokio::main]\n async fn main() {\n let make_svc = make_service_fn(|_conn| {\n async {\n Ok::<_, Infallible>(service_fn(proxy))\n }\n });\n \n let addr = ([127, 0, 0, 1], 3000).into();\n let server = Server::bind(&addr).serve(make_svc);\n \n println!(\"Listening on http://{}\", addr);\n \n if let Err(e) = server.await {\n eprintln!(\"server error: {}\", e);\n }\n }\n \n To run this code, ensure you have Rust and Cargo installed, then create a new project, add the dependencies in `Cargo.toml`, and replace the contents of `src/main.rs` with the provided code.\n <<<"
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
tests::code_literal
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 26 filtered out; finished in 0.00s