forked from lavina/lavina
11 lines
325 B
Rust
11 lines
325 B
Rust
use std::convert::Infallible;
|
|
|
|
use http_body_util::Full;
|
|
use hyper::{body::Bytes, Response, StatusCode};
|
|
|
|
pub fn not_found() -> std::result::Result<Response<Full<Bytes>>, Infallible> {
|
|
let mut response = Response::new(Full::new(Bytes::from("404")));
|
|
*response.status_mut() = StatusCode::NOT_FOUND;
|
|
Ok(response)
|
|
}
|