From a308fc8af816cf8c31381b0622785f7b446e651a Mon Sep 17 00:00:00 2001 From: realaravinth Date: Sun, 11 Jul 2021 16:34:08 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20=20@=200dad0?= =?UTF-8?q?068223fa149f7a5dfb5cd171342d97f25c9=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache_buster/processor/index.html | 2 +- cache_buster/processor/struct.Buster.html | 2 +- search-index.js | 2 +- src/actix_web/main.rs.html | 8 ++++---- src/cache_buster/processor.rs.html | 8 +++++--- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cache_buster/processor/index.html b/cache_buster/processor/index.html index 3478867..89e7c89 100644 --- a/cache_buster/processor/index.html +++ b/cache_buster/processor/index.html @@ -1,7 +1,7 @@ cache_buster::processor - Rust

Module cache_buster::processor[][src]

Module describing file processor that changes filenames to setup cache-busting

+ Change settings

Module cache_buster::processor[][src]

Module describing file processor that changes filenames to setup cache-busting

Run the following during build using build.rs:

diff --git a/cache_buster/processor/struct.Buster.html b/cache_buster/processor/struct.Buster.html
index 94ab8c3..34df283 100644
--- a/cache_buster/processor/struct.Buster.html
+++ b/cache_buster/processor/struct.Buster.html
@@ -2,7 +2,7 @@
 
 

Struct cache_buster::processor::Buster[][src]

pub struct Buster<'a> { /* fields omitted */ }

Configuration for setting up cache-busting

-

Implementations

impl<'a> Buster<'a>[src]

pub fn process(&self) -> Result<(), Error>[src]

Processes files.

+

Implementations

impl<'a> Buster<'a>[src]

pub fn process(&self) -> Result<(), Error>[src]

Processes files.

Panics when a weird MIME is encountered.

Trait Implementations

impl<'a> Clone for Buster<'a>[src]

 /*
 * Copyright (C) 2021  Aravinth Manivannan <realaravinth@batsense.net>
@@ -672,6 +673,7 @@
     // creates base_dir to output files to
     fn init(&self) -> Result<(), Error> {
         let res = Path::new(&self.result);
+        println!("cargo:rerun-if-changed={}", self.source);
         if res.exists() {
             fs::remove_dir_all(&self.result).unwrap();
         }
@@ -983,7 +985,7 @@
                 let source = Path::new(k);
                 let dest = Path::new(&v);
                 let no_hash = Path::new(file);
-                source == &Path::new(&config.source).join(file)
+                source == Path::new(&config.source).join(file)
                     && dest.exists()
                     && no_hash.file_name() == dest.file_name()
             }));
@@ -1061,7 +1063,7 @@
         config.process().unwrap();
         let files = Files::load();
 
-        assert!(files.map.iter().any(|(k, v)| {
+        assert!(files.map.iter().any(|(_k, v)| {
             let dest = Path::new(&v);
             dest.extension().unwrap().to_str().unwrap() == APPLICATION_WASM && dest.exists()
         }));
@@ -1080,7 +1082,7 @@
                 let source = Path::new(k);
                 let dest = Path::new(&v);
                 let no_hash = Path::new(file);
-                source == &Path::new(&config.source).join(file)
+                source == Path::new(&config.source).join(file)
                     && dest.exists()
                     && no_hash.file_name() == dest.file_name()
             }));