mirror of
https://github.com/openharmony/third_party_rust_codespan.git
synced 2026-07-18 15:54:35 -04:00
Fix build on wasm with serialization feature`
serde` only implements `Serialize` for `OsString` on unix and windows.
This commit is contained in:
@@ -326,7 +326,11 @@ where
|
||||
|
||||
/// A file that is stored in the database.
|
||||
#[derive(Debug, Clone)]
|
||||
#[cfg_attr(feature = "serialization", derive(Deserialize, Serialize))]
|
||||
// `Serialize` is only implemented on `OsString` for windows/unix
|
||||
#[cfg_attr(
|
||||
all(feature = "serialization", any(windows, unix)),
|
||||
derive(Deserialize, Serialize)
|
||||
)]
|
||||
struct File<Source> {
|
||||
/// The name of the file.
|
||||
name: OsString,
|
||||
|
||||
Reference in New Issue
Block a user