appease clippy
```
error: large size difference between variants
--> crates/notedeck_columns/src/column.rs:249:1
|
249 | / pub enum IntermediaryRoute {
250 | | Timeline(Timeline),
| | ------------------ the largest variant contains at least 280 bytes
251 | | Route(Route),
| | ------------ the second-largest variant contains at least 72 bytes
252 | | }
| |_^ the entire enum is at least 280 bytes
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
= note: `-D clippy::large-enum-variant` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
|
250 - Timeline(Timeline),
250 + Timeline(Box<Timeline>),
|
error: could not compile `notedeck_columns` (lib) due to 1 previous error
```
Signed-off-by: kernelkind <kernelkind@gmail.com>
This commit is contained in:
@@ -124,7 +124,7 @@ impl Columns {
|
||||
IntermediaryRoute::Timeline(mut timeline) => {
|
||||
let route = Route::timeline(timeline.kind.clone());
|
||||
timeline.subscription.increment();
|
||||
timeline_cache.insert(timeline.kind.clone(), timeline);
|
||||
timeline_cache.insert(timeline.kind.clone(), *timeline);
|
||||
route
|
||||
}
|
||||
IntermediaryRoute::Route(route) => route,
|
||||
@@ -247,7 +247,7 @@ impl Columns {
|
||||
}
|
||||
|
||||
pub enum IntermediaryRoute {
|
||||
Timeline(Timeline),
|
||||
Timeline(Box<Timeline>),
|
||||
Route(Route),
|
||||
}
|
||||
|
||||
|
||||
@@ -351,9 +351,9 @@ impl CleanIntermediaryRoute {
|
||||
match self {
|
||||
CleanIntermediaryRoute::ToTimeline(timeline_kind) => {
|
||||
let txn = Transaction::new(ndb).unwrap();
|
||||
Some(IntermediaryRoute::Timeline(
|
||||
Some(IntermediaryRoute::Timeline(Box::new(
|
||||
timeline_kind.into_timeline(&txn, ndb)?,
|
||||
))
|
||||
)))
|
||||
}
|
||||
CleanIntermediaryRoute::ToRoute(route) => Some(IntermediaryRoute::Route(route)),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user