forked from alemi/upub
alemi
ea655be121
... yet! this fixes the weird bug that resets timeline scroll when coming back from users (annoying!). also slightly better spacing for things and more consistent loading buttons. its a big refactor and its underway but there's so much in progress that ill commit this big chunk as is and i totally wont regret it later when i need to remember what i was moving where aha
11 lines
193 B
Rust
11 lines
193 B
Rust
|
|
pub trait Getter<T: Default> {
|
|
/// .ok().unwrap_or_default()
|
|
fn want(self) -> T;
|
|
}
|
|
|
|
impl<T: Default> Getter<T> for apb::Field<T> {
|
|
fn want(self) -> T {
|
|
self.ok().unwrap_or_default()
|
|
}
|
|
}
|