cargo fmt
This commit is contained in:
@@ -132,7 +132,10 @@ impl<'t> Server for LocalServer<'t> {
|
||||
}
|
||||
|
||||
/// Get a vector of all versions after `since_version`
|
||||
fn get_child_version(&mut self, parent_version_id: VersionId) -> anyhow::Result<GetVersionResult> {
|
||||
fn get_child_version(
|
||||
&mut self,
|
||||
parent_version_id: VersionId,
|
||||
) -> anyhow::Result<GetVersionResult> {
|
||||
if let Some(version) = self.get_version_by_parent_version_id(parent_version_id)? {
|
||||
Ok(GetVersionResult::Version {
|
||||
version_id: version.version_id,
|
||||
|
||||
@@ -62,7 +62,9 @@ impl TryFrom<ureq::Response> for HistoryCiphertext {
|
||||
reader.read_to_end(&mut bytes)?;
|
||||
Ok(Self(bytes))
|
||||
} else {
|
||||
Err(anyhow::anyhow!("Response did not have expected content-type"))
|
||||
Err(anyhow::anyhow!(
|
||||
"Response did not have expected content-type"
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,10 @@ impl Server for RemoteServer {
|
||||
}
|
||||
}
|
||||
|
||||
fn get_child_version(&mut self, parent_version_id: VersionId) -> anyhow::Result<GetVersionResult> {
|
||||
fn get_child_version(
|
||||
&mut self,
|
||||
parent_version_id: VersionId,
|
||||
) -> anyhow::Result<GetVersionResult> {
|
||||
let url = format!(
|
||||
"{}/client/get-child-version/{}",
|
||||
self.origin, parent_version_id
|
||||
|
||||
@@ -63,7 +63,10 @@ impl Server for TestServer {
|
||||
}
|
||||
|
||||
/// Get a vector of all versions after `since_version`
|
||||
fn get_child_version(&mut self, parent_version_id: VersionId) -> anyhow::Result<GetVersionResult> {
|
||||
fn get_child_version(
|
||||
&mut self,
|
||||
parent_version_id: VersionId,
|
||||
) -> anyhow::Result<GetVersionResult> {
|
||||
if let Some(version) = self.versions.get(&parent_version_id) {
|
||||
Ok(GetVersionResult::Version {
|
||||
version_id: version.version_id,
|
||||
|
||||
@@ -43,5 +43,8 @@ pub trait Server {
|
||||
) -> anyhow::Result<AddVersionResult>;
|
||||
|
||||
/// Get the version with the given parent VersionId
|
||||
fn get_child_version(&mut self, parent_version_id: VersionId) -> anyhow::Result<GetVersionResult>;
|
||||
fn get_child_version(
|
||||
&mut self,
|
||||
parent_version_id: VersionId,
|
||||
) -> anyhow::Result<GetVersionResult>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user