File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -137,20 +137,14 @@ impl Timestamp {
137
137
)
138
138
}
139
139
140
- #[ deprecated( note = "use `to_unix` instead" ) ]
140
+ #[ deprecated( note = "use `to_unix` instead; this method will be removed in a future release " ) ]
141
141
/// Get the number of fractional nanoseconds in the Unix timestamp.
142
142
///
143
143
/// This method is deprecated and probably doesn't do what you're expecting it to.
144
144
/// It doesn't return the timestamp as nanoseconds since the Unix epoch, it returns
145
145
/// the fractional seconds of the timestamp.
146
146
pub const fn to_unix_nanos ( & self ) -> u32 {
147
- // NOTE: This method never did what it said on the tin: instead of
148
- // converting the timestamp into nanos it simply returned the nanoseconds
149
- // part of the timestamp.
150
- //
151
- // We can't fix the behavior because the return type is too small to fit
152
- // a useful value for nanoseconds since the epoch.
153
- self . nanos
147
+ panic ! ( "`Timestamp::to_unix_nanos` is deprecated and will be removed: use `Timestamp::to_unix` instead" )
154
148
}
155
149
}
156
150
You can’t perform that action at this time.
0 commit comments