update examples

This commit is contained in:
David Pedersen
2022-07-03 21:47:23 +02:00
parent 02f9ebaee9
commit 16ef59b6ce
38 changed files with 101 additions and 83 deletions
+2 -2
View File
@@ -40,7 +40,7 @@ async fn main() {
.init();
// Build our application by composing routes
let app = Router::new()
let app = Router::without_state()
.route(
"/:key",
// Add compression to `kv_get`
@@ -110,7 +110,7 @@ async fn list_keys(Extension(state): Extension<SharedState>) -> String {
.join("\n")
}
fn admin_routes() -> Router {
fn admin_routes() -> Router<()> {
async fn delete_all_keys(Extension(state): Extension<SharedState>) {
state.write().unwrap().db.clear();
}