We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cdf924 commit 2e4bfd8Copy full SHA for 2e4bfd8
collab-database/src/template/timestamp_parse.rs
@@ -10,12 +10,14 @@ pub struct TimestampCellData {
10
}
11
12
impl TimestampCellData {
13
- pub fn new(timestamp: Option<i64>) -> Self {
14
- Self { timestamp }
+ pub fn new<T: Into<Option<i64>>>(timestamp: T) -> Self {
+ Self {
15
+ timestamp: timestamp.into(),
16
+ }
17
18
- pub fn to_cell(&self, field_type: FieldType) -> Cell {
- let data: TimestampCellDataWrapper = (field_type, self.clone()).into();
19
+ pub fn to_cell<T: Into<FieldType>>(&self, field_type: T) -> Cell {
20
+ let data: TimestampCellDataWrapper = (field_type.into(), self.clone()).into();
21
data.into()
22
23
0 commit comments