Skip to content

Commit abc3d43

Browse files
committed
Make default rewrites public
1 parent c050d07 commit abc3d43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/lib/src/fs/server.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ pub enum FileServerResponse {
128128
}
129129

130130
// These might have to remain as basic options (always processed first)
131-
struct DotFiles;
131+
pub struct DotFiles;
132132
impl Rewrite for DotFiles {
133133
fn rewrite(&self, _req: &Request<'_>, path: FileServerResponse, _root: &Path)
134134
-> FileServerResponse
@@ -147,7 +147,7 @@ impl Rewrite for DotFiles {
147147
// }
148148
// }
149149

150-
struct Index(&'static str);
150+
pub struct Index(pub &'static str);
151151
impl Rewrite for Index {
152152
fn rewrite(&self, _req: &Request<'_>, path: FileServerResponse, root: &Path)
153153
-> FileServerResponse
@@ -161,7 +161,7 @@ impl Rewrite for Index {
161161
}
162162
// Actually, curiously, this already just works as-is (the only thing that prevents
163163
// it is the startup check)
164-
struct IndexFile;
164+
pub struct IndexFile;
165165
impl Rewrite for IndexFile {
166166
fn rewrite(&self, _req: &Request<'_>, path: FileServerResponse, _root: &Path)
167167
-> FileServerResponse
@@ -172,7 +172,7 @@ impl Rewrite for IndexFile {
172172
}
173173
}
174174

175-
struct NormalizeDirs;
175+
pub struct NormalizeDirs;
176176
impl Rewrite for NormalizeDirs {
177177
fn rewrite(&self, req: &Request<'_>, path: FileServerResponse, root: &Path)
178178
-> FileServerResponse

0 commit comments

Comments
 (0)