chore(tvix/store/directorysvc): clippy
Change-Id: Idf45aaa0f6211ac35a9a41d0f3f60dfbe1009398 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8811 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
This commit is contained in:
parent
71093a513a
commit
b10f008b03
2 changed files with 7 additions and 10 deletions
|
|
@ -18,9 +18,8 @@ use super::{DirectoryService, GRPCDirectoryService, MemoryDirectoryService, Sled
|
|||
/// - `grpc+http://host:port`, `grpc+https://host:port`
|
||||
/// Connects to a (remote) tvix-store gRPC service.
|
||||
pub fn from_addr(uri: &str) -> Result<Arc<dyn DirectoryService>, crate::Error> {
|
||||
let url = Url::parse(uri).map_err(|e| {
|
||||
crate::Error::StorageError(format!("unable to parse url: {}", e.to_string()))
|
||||
})?;
|
||||
let url = Url::parse(uri)
|
||||
.map_err(|e| crate::Error::StorageError(format!("unable to parse url: {}", e)))?;
|
||||
|
||||
Ok(if url.scheme() == "memory" {
|
||||
Arc::new(MemoryDirectoryService::from_url(&url)?)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue