Skip to content

Commit 089d2bf

Browse files
committed
chore: Only use a single output format
1 parent b651cb1 commit 089d2bf

File tree

1 file changed

+0
-24
lines changed
  • rust/boil/src/show/images

1 file changed

+0
-24
lines changed

rust/boil/src/show/images/mod.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,6 @@ pub enum Error {
1818
BuildTargets { source: TargetsError },
1919
}
2020

21-
// NOTE (@Techassi): I don't know if I like this... but this makes the stdout output very convient
22-
// to consume.
23-
struct OneOrMany(BTreeMap<String, Vec<String>>);
24-
25-
impl Serialize for OneOrMany {
26-
fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
27-
where
28-
S: serde::Serializer,
29-
{
30-
if self.0.len() == 1 {
31-
let mut seq = serializer.serialize_seq(Some(1))?;
32-
for entry in &self.0 {
33-
for version in entry.1 {
34-
seq.serialize_element(&version)?;
35-
}
36-
}
37-
38-
Ok(seq.end()?)
39-
} else {
40-
self.0.serialize(serializer)
41-
}
42-
}
43-
}
44-
4521
/// This is the `boil show images` command handler function.
4622
pub fn run_command(arguments: ShowImagesArguments) -> Result<(), Error> {
4723
let list: BTreeMap<_, _> = if arguments.image.is_empty() {

0 commit comments

Comments
 (0)