rustfmt, fixed prohibiting set generation
This commit is contained in:
@ -5,37 +5,37 @@
|
||||
|
||||
use std::io;
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use super::graph;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use super::translator::Translator;
|
||||
|
||||
#[derive(Serialize, Deserialize)]
|
||||
struct GraphAndTranslator {
|
||||
graph: graph::SystemGraph,
|
||||
translator: Translator
|
||||
translator: Translator,
|
||||
}
|
||||
|
||||
/// Serializer for graph and translator.
|
||||
pub fn ser<W>(
|
||||
writer: W,
|
||||
graph: &graph::SystemGraph,
|
||||
translator: &Translator
|
||||
translator: &Translator,
|
||||
) -> Result<(), serde_cbor_2::Error>
|
||||
where
|
||||
W: io::Write,
|
||||
{
|
||||
serde_cbor_2::to_writer(writer,
|
||||
&GraphAndTranslator {
|
||||
graph: graph.clone(),
|
||||
translator: translator.clone()
|
||||
})
|
||||
serde_cbor_2::to_writer(
|
||||
writer,
|
||||
&GraphAndTranslator {
|
||||
graph: graph.clone(),
|
||||
translator: translator.clone(),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
/// Deserializer for file that contains graph and translator.
|
||||
pub fn de<R>(
|
||||
reader: R
|
||||
) -> Result<(graph::SystemGraph, Translator), serde_cbor_2::Error>
|
||||
pub fn de<R>(reader: R) -> Result<(graph::SystemGraph, Translator), serde_cbor_2::Error>
|
||||
where
|
||||
R: io::Read,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user