Skip to content

Commit d1cee40

Browse files
committed
Implement debug for ToCssResult
Closes parcel-bundler#212
1 parent 2e74034 commit d1cee40

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/dependencies.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use cssparser::SourceLocation;
1717
use serde::Serialize;
1818

1919
/// A dependency.
20-
#[derive(Serialize)]
20+
#[derive(Serialize, Debug)]
2121
#[serde(tag = "type", rename_all = "lowercase")]
2222
pub enum Dependency {
2323
/// An `@import` dependency.
@@ -27,7 +27,7 @@ pub enum Dependency {
2727
}
2828

2929
/// An `@import` dependency.
30-
#[derive(Serialize)]
30+
#[derive(Serialize, Debug)]
3131
pub struct ImportDependency {
3232
/// The url to import.
3333
pub url: String,
@@ -74,7 +74,7 @@ impl ImportDependency {
7474
}
7575

7676
/// A `url()` dependency.
77-
#[derive(Serialize)]
77+
#[derive(Serialize, Debug)]
7878
pub struct UrlDependency {
7979
/// The url of the dependency.
8080
pub url: String,
@@ -97,7 +97,7 @@ impl UrlDependency {
9797
}
9898

9999
/// Represents the range of source code where a dependency was found.
100-
#[derive(Serialize)]
100+
#[derive(Serialize, Debug)]
101101
#[serde(rename_all = "camelCase")]
102102
pub struct SourceRange {
103103
/// The filename in which the dependency was found.

src/stylesheet.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ pub struct MinifyOptions {
8383

8484
/// A result returned from `to_css`, including the serialize CSS
8585
/// and other metadata depending on the input options.
86+
#[derive(Debug)]
8687
pub struct ToCssResult {
8788
/// Serialized CSS code.
8889
pub code: String,

0 commit comments

Comments
 (0)