about summary refs log tree commit diff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 93e4593..ffef443 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,23 +1,20 @@
-#[allow(unused_imports)]
-use warp::Filter;
+#![deny(unsafe_code)]
+#![warn(clippy::todo)]
 
 pub mod metrics;
 /// Database abstraction layer for Kittybox, allowing the CMS to work with any kind of database.
 pub mod database;
 pub mod micropub;
 pub mod indieauth;
-//pub mod frontend;
+pub mod frontend;
 
-/*use crate::indieauth::IndieAuthMiddleware;
-use crate::micropub::CORSMiddleware;*/
-
-pub mod rejections {
+pub(crate) mod rejections {
     #[derive(Debug)]
-    pub struct UnacceptableContentType;
+    pub(crate) struct UnacceptableContentType;
     impl warp::reject::Reject for UnacceptableContentType {}
 
     #[derive(Debug)]
-    pub struct HostHeaderUnset;
+    pub(crate) struct HostHeaderUnset;
     impl warp::reject::Reject for HostHeaderUnset {}
 }
 
@@ -49,6 +46,7 @@ pub mod util {
                 // This is unneccesarily complicated because I want to reuse some http-types parsing
                 // and http-types has constructor for Headers private so I need to construct
                 // a mock Request to reason about headers... this is so dumb wtf
+                // so much for zero-cost abstractions, huh
                 let bytes: &[u8] = accept.as_bytes();
                 let value = http_types::headers::HeaderValue::from_bytes(bytes.to_vec()).unwrap();
                 let values: http_types::headers::HeaderValues = vec![value].into();