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()
             }));