summaryrefslogtreecommitdiffstats
path: root/librepology/src/v1/buffer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'librepology/src/v1/buffer.rs')
-rw-r--r--librepology/src/v1/buffer.rs15
1 files changed, 6 insertions, 9 deletions
diff --git a/librepology/src/v1/buffer.rs b/librepology/src/v1/buffer.rs
index 534ab4c..e2eb67a 100644
--- a/librepology/src/v1/buffer.rs
+++ b/librepology/src/v1/buffer.rs
@@ -1,20 +1,20 @@
use std::io::Read;
-use crate::v1::error::Result;
+use crate::v1::api::Api;
use crate::v1::error::RepologyError as Error;
-use crate::v1::types::Problem;
+use crate::v1::error::Result;
use crate::v1::types::Package;
-use crate::v1::api::Api;
+use crate::v1::types::Problem;
#[derive(Debug)]
pub struct BufferApi {
buf: String,
}
-impl BufferApi
-{
+impl BufferApi {
pub fn read_from<R>(mut input: R) -> Result<BufferApi>
- where R: Read,
+ where
+ R: Read,
{
let mut buf = String::new();
let read = input.read_to_string(&mut buf)?;
@@ -24,7 +24,6 @@ impl BufferApi
}
impl Api for BufferApi {
-
fn project<N: AsRef<str>>(&self, _name: N) -> Result<Vec<Package>> {
serde_json::de::from_str(&self.buf).map_err(Error::from)
}
@@ -36,6 +35,4 @@ impl Api for BufferApi {
fn problems_for_maintainer<M: AsRef<str>>(&self, _maintainer: M) -> Result<Vec<Problem>> {
serde_json::de::from_str(&self.buf).map_err(Error::from)
}
-
}
-