Add lib.rs, scaffold testing
This commit is contained in:
parent
99d05223d7
commit
d9a6938eb6
11 changed files with 57 additions and 14 deletions
|
|
@ -8,6 +8,8 @@ use crate::{
|
|||
};
|
||||
use crate::handlers;
|
||||
|
||||
/// # Panics
|
||||
/// Will panic if file read fails.
|
||||
pub async fn file(file_path: &str, content_type: &str) -> Response<Body> {
|
||||
let content = match std::fs::read(file_path) {
|
||||
Ok(s) => s,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue