diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2020-10-09 15:45:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 15:45:40 -0400 |
commit | 2379a3b3403462ae95fef05beee43efb3e51b2c7 (patch) | |
tree | e35cf4b5c10af0e7938e6422dbfb99bee3e94912 /core | |
parent | f4357f0ff9d39411f22504fcc20db6bd5dec6ddb (diff) |
Implement Serialize for ModuleSpecifier (#7900)
Also re-export serde from deno_core, since its now a dependency.
Diffstat (limited to 'core')
-rw-r--r-- | core/Cargo.toml | 5 | ||||
-rw-r--r-- | core/lib.rs | 1 | ||||
-rw-r--r-- | core/module_specifier.rs | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/core/Cargo.toml b/core/Cargo.toml index 5a13be0d1..0a66596aa 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -20,9 +20,10 @@ lazy_static = "1.4.0" libc = "0.2.77" log = "0.4.11" rusty_v8 = "0.11.0" -serde_json = { version = "1.0.57", features = ["preserve_order"] } +serde_json = { version = "1.0", features = ["preserve_order"] } +serde = { version = "1.0", features = ["derive"] } smallvec = "1.4.2" -url = "2.1.1" +url = { version = "2.1.1", features = ["serde"] } [[example]] name = "http_bench_bin_ops" diff --git a/core/lib.rs b/core/lib.rs index 94cd07992..e03ce2a7d 100644 --- a/core/lib.rs +++ b/core/lib.rs @@ -22,6 +22,7 @@ mod zero_copy_buf; // Re-exports pub use futures; pub use rusty_v8 as v8; +pub use serde; pub use serde_json; pub use url; diff --git a/core/module_specifier.rs b/core/module_specifier.rs index 0dfc7a592..82452c067 100644 --- a/core/module_specifier.rs +++ b/core/module_specifier.rs @@ -48,7 +48,7 @@ impl fmt::Display for ModuleResolutionError { } } -#[derive(Debug, Clone, Eq, Hash, PartialEq)] +#[derive(Debug, Clone, Eq, Hash, PartialEq, serde::Serialize)] /// Resolved module specifier pub struct ModuleSpecifier(Url); |