Skip to content

Commit

Permalink
Workaround for seanmonstar#171
Browse files Browse the repository at this point in the history
  • Loading branch information
flosse committed May 12, 2021
1 parent 6711e65 commit 7a26097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/filters/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ fn sanitize_path(base: impl AsRef<Path>, tail: &str) -> Result<PathBuf, Rejectio
}

#[derive(Debug)]
struct Conditionals {
pub struct Conditionals {
if_modified_since: Option<IfModifiedSince>,
if_unmodified_since: Option<IfUnmodifiedSince>,
if_range: Option<IfRange>,
Expand Down Expand Up @@ -195,7 +195,7 @@ impl Conditionals {
}
}

fn conditionals() -> impl Filter<Extract = One<Conditionals>, Error = Infallible> + Copy {
pub fn conditionals() -> impl Filter<Extract = One<Conditionals>, Error = Infallible> + Copy {
crate::header::optional2()
.and(crate::header::optional2())
.and(crate::header::optional2())
Expand Down Expand Up @@ -244,7 +244,7 @@ impl File {

// Silly wrapper since Arc<PathBuf> doesn't implement AsRef<Path> ;_;
#[derive(Clone, Debug)]
struct ArcPath(Arc<PathBuf>);
pub struct ArcPath(pub Arc<PathBuf>);

impl AsRef<Path> for ArcPath {
fn as_ref(&self) -> &Path {
Expand All @@ -258,7 +258,7 @@ impl Reply for File {
}
}

fn file_reply(
pub fn file_reply(
path: ArcPath,
conditionals: Conditionals,
) -> impl Future<Output = Result<File, Rejection>> + Send {
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![doc(html_root_url = "https://docs.rs/warp/0.3.1")]
#![deny(missing_docs)]
#![deny(missing_debug_implementations)]
#![cfg_attr(test, deny(warnings))]

Expand Down

0 comments on commit 7a26097

Please sign in to comment.