mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-23 18:51:04 +00:00
Macro attributes to specify From and Into trait types for structs and enums (#817)
* serde macro support for type conversions through From and Into trait * Revisions requested by dtolnay * Additional changes requested by dtolnay
This commit is contained in:
committed by
David Tolnay
parent
c488cec641
commit
bc946e4fd7
+1
-1
@@ -7,7 +7,7 @@ use std::borrow::Cow;
|
||||
use collections::borrow::Cow;
|
||||
|
||||
pub use core::default::Default;
|
||||
pub use core::fmt;
|
||||
pub use core::{fmt, clone, convert};
|
||||
pub use core::marker::PhantomData;
|
||||
pub use core::option::Option::{self, None, Some};
|
||||
pub use core::result::Result::{self, Ok, Err};
|
||||
|
||||
+2
-1
@@ -79,7 +79,8 @@ extern crate core as actual_core;
|
||||
#[cfg(feature = "std")]
|
||||
mod core {
|
||||
pub use std::{ops, hash, fmt, cmp, marker, mem, i8, i16, i32, i64, u8, u16, u32, u64, isize,
|
||||
usize, f32, f64, char, str, num, slice, iter, cell, default, result, option};
|
||||
usize, f32, f64, char, str, num, slice, iter, cell, default, result, option,
|
||||
clone, convert};
|
||||
#[cfg(feature = "unstable")]
|
||||
pub use actual_core::nonzero;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user