Skip to content

Commit 19facae

Browse files
Fix the build.
1 parent 8c987bc commit 19facae

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

src/strip_data.rs

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
use crate::data::{
2-
DataSourceDescription, DataSourceInfo, EntryID, EntryIndex, EntryInfo, Field, ItemLink,
3-
ItemUID, SlotMetaTile, SlotTile, SummaryTile, TileID, DataSource,
2+
DataSource, DataSourceDescription, DataSourceInfo, EntryID, Field, ItemLink, SlotMetaTile,
3+
SlotTile, SummaryTile, TileID,
44
};
55

66
pub struct StripDataSource<T: DataSource> {
77
data_source: T,
88
}
99

10-
1110
impl<T: DataSource> StripDataSource<T> {
1211
pub fn new(data_source: T) -> Self {
13-
Self {
14-
data_source,
15-
}
12+
Self { data_source }
1613
}
1714
}
1815

@@ -33,21 +30,33 @@ impl<T: DataSource> DataSource for StripDataSource<T> {
3330
self.data_source.fetch_slot_tile(entry_id, tile_id, full)
3431
}
3532

36-
fn fetch_slot_meta_tile(&self, entry_id: &EntryID, tile_id: TileID, full: bool) -> SlotMetaTile {
37-
let mut tile = self.data_source
33+
fn fetch_slot_meta_tile(
34+
&self,
35+
entry_id: &EntryID,
36+
tile_id: TileID,
37+
full: bool,
38+
) -> SlotMetaTile {
39+
let mut tile = self
40+
.data_source
3841
.fetch_slot_meta_tile(entry_id, tile_id, full);
3942
for row in &mut tile.data.items {
4043
for item in row {
4144
item.title = "Redacted".to_string();
42-
for field in item.fields {
45+
for field in &mut item.fields {
4346
match field.1 {
44-
Field::I64(_) => {},
45-
Field::U64(_) => {},
46-
Field::String(x) => { *x = "Redacted".to_string(); },
47-
Field::Interval(_) => {},
48-
Field::ItemLink(ItemLink { title, .. }) => { *title = "Redacted".to_string(); },
49-
Field::Vec(_) => { todo!() },
50-
Field::Empty => {},
47+
Field::I64(_) => {}
48+
Field::U64(_) => {}
49+
Field::String(ref mut x) => {
50+
*x = "Redacted".to_string();
51+
}
52+
Field::Interval(_) => {}
53+
Field::ItemLink(ItemLink { ref mut title, .. }) => {
54+
*title = "Redacted".to_string();
55+
}
56+
Field::Vec(_) => {
57+
todo!()
58+
}
59+
Field::Empty => {}
5160
}
5261
}
5362
}

0 commit comments

Comments
 (0)