Skip to content

Commit

Permalink
refactor: remove webdav feature (#366)
Browse files Browse the repository at this point in the history
No longer needed as `WebDavFs` is implemented now directly in rustic.
The implementation anyhow is not correct as blocking methods are called
directly in async context.

Co-authored-by: simonsan <[email protected]>
  • Loading branch information
aawsome and simonsan authored Nov 24, 2024
1 parent 55e33db commit 60a7e31
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 480 deletions.
98 changes: 0 additions & 98 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ default = []
cli = ["merge", "clap"]
merge = ["dep:conflate"]
clap = ["dep:clap"]
webdav = ["dep:dav-server", "dep:futures"]

[package.metadata.docs.rs]
all-features = true
Expand Down Expand Up @@ -90,8 +89,6 @@ clap = { version = "4.5.19", optional = true, features = ["derive", "env", "wrap
conflate = { version = "0.3.1", optional = true }

# vfs support
dav-server = { version = "0.7.0", default-features = false, optional = true }
futures = { version = "0.3.30", optional = true }
runtime-format = "0.1.3"

# other dependencies
Expand Down
25 changes: 0 additions & 25 deletions crates/core/src/vfs.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
mod format;
#[cfg(feature = "webdav")]
mod webdavfs;

use std::{
collections::BTreeMap,
Expand All @@ -12,10 +10,6 @@ use bytes::{Bytes, BytesMut};
use runtime_format::FormatArgs;
use strum::EnumString;

#[cfg(feature = "webdav")]
/// A struct which enables `WebDAV` access to a [`Vfs`] using [`dav-server`]
pub use crate::vfs::webdavfs::WebDavFS;

use crate::{
blob::{tree::TreeId, BlobId, DataId},
error::{ErrorKind, RusticError, RusticResult},
Expand Down Expand Up @@ -455,25 +449,6 @@ impl Vfs {
};
Ok(result)
}

#[cfg(feature = "webdav")]
/// Turn the [`Vfs`] into a [`WebDavFS`]
///
/// # Arguments
///
/// * `repo` - The repository to use
/// * `file_policy` - The policy to use for files
///
/// # Returns
///
/// The boxed [`WebDavFS`] for the [`Vfs`]
pub fn into_webdav_fs<P, S: IndexedFull>(
self,
repo: Repository<P, S>,
file_policy: FilePolicy,
) -> Box<WebDavFS<P, S>> {
Box::new(WebDavFS::new(repo, self, file_policy))
}
}

/// `OpenFile` stores all information needed to access the contents of a file node
Expand Down
Loading

0 comments on commit 60a7e31

Please sign in to comment.