aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-03 05:16:44 +0000
committerFuwn <[email protected]>2023-04-03 05:16:44 +0000
commitee4444549584189390e55594cdb4a1de1ff6ec1a (patch)
tree04d3eff689f42dfe5e04c992442b55ecd6687e5d /src
parentfix(context): clippy lints (diff)
downloadwindmark-ee4444549584189390e55594cdb4a1de1ff6ec1a.tar.xz
windmark-ee4444549584189390e55594cdb4a1de1ff6ec1a.zip
style: seperate blocks
Diffstat (limited to 'src')
-rw-r--r--src/router.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/router.rs b/src/router.rs
index bd2eaf9..7761e3c 100644
--- a/src/router.rs
+++ b/src/router.rs
@@ -79,6 +79,7 @@ pub struct Router {
modules: Arc<Mutex<Vec<Box<dyn Module + Send>>>>,
fix_path: bool,
}
+
impl Router {
/// Create a new `Router`
///
@@ -290,6 +291,7 @@ impl Router {
String::from_utf8(buffer[0..size].to_vec()),
"59 The server (Windmark) received a bad request: {}"
);
+
url = or_error!(
stream,
url::Url::parse(&request.replace("\r\n", "")),
@@ -346,6 +348,7 @@ impl Router {
)),
));
}
+
for (i, partial_footer) in {
#[allow(clippy::needless_borrow)]
(&mut *self.footers.lock().unwrap()).iter_mut().enumerate()
@@ -501,6 +504,7 @@ impl Router {
#[cfg(feature = "logger")]
pub fn enable_default_logger(&mut self, enable: bool) -> &mut Self {
self.default_logger = enable;
+
std::env::set_var("RUST_LOG", "windmark=trace");
self
@@ -659,6 +663,7 @@ impl Router {
/// struct Clicker {
/// clicks: isize,
/// }
+ ///
/// impl windmark::Module for Clicker {
/// fn on_attach(&mut self, _: &mut Router) {
/// info!("clicker has been attached!");