chore: Move use for TryInto to top
This commit is contained in:
parent
c2adaf7ee0
commit
ab2800b4d8
1 changed files with 1 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
//! Types that specify what is contained in a ZIP.
|
//! Types that specify what is contained in a ZIP.
|
||||||
#[cfg(feature = "time")]
|
#[cfg(feature = "time")]
|
||||||
use std::convert::TryFrom;
|
use std::convert::{TryFrom, TryInto};
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
all(target_arch = "arm", target_pointer_width = "32"),
|
all(target_arch = "arm", target_pointer_width = "32"),
|
||||||
target_arch = "mips",
|
target_arch = "mips",
|
||||||
|
@ -173,8 +173,6 @@ impl DateTime {
|
||||||
#[allow(clippy::result_unit_err)]
|
#[allow(clippy::result_unit_err)]
|
||||||
#[deprecated(note = "use `DateTime::try_from()`")]
|
#[deprecated(note = "use `DateTime::try_from()`")]
|
||||||
pub fn from_time(dt: OffsetDateTime) -> Result<DateTime, ()> {
|
pub fn from_time(dt: OffsetDateTime) -> Result<DateTime, ()> {
|
||||||
use std::convert::TryInto;
|
|
||||||
|
|
||||||
dt.try_into().map_err(|_err| ())
|
dt.try_into().map_err(|_err| ())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue