Skip to content

Commit fb47e0c

Browse files
committed
chore: Update dprint-core version.
1 parent e95ed36 commit fb47e0c

File tree

3 files changed

+5
-27
lines changed

3 files changed

+5
-27
lines changed

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repository = "https://github.com/dprint/dprint-plugin-typescript"
1313
crate-type = ["lib", "cdylib"]
1414

1515
[dependencies]
16-
dprint-core = "0.22.0"
16+
dprint-core = "0.23.0"
1717
swc_common = "=0.6.1"
1818
swc_ecma_ast = "=0.22.0"
1919
swc_ecma_parser = "=0.26.1"

src/configuration/types.rs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,7 @@
11
use serde::{Serialize, Deserialize};
2+
use dprint_core::generate_str_to_from;
23
use dprint_core::configuration::*;
34

4-
macro_rules! generate_str_to_from {
5-
($enum_name:ident, $([$member_name:ident, $string_value:expr]),* ) => {
6-
impl std::str::FromStr for $enum_name {
7-
type Err = ParseConfigurationError;
8-
9-
fn from_str(s: &str) -> Result<Self, Self::Err> {
10-
match s {
11-
$($string_value => Ok($enum_name::$member_name)),*,
12-
_ => Err(ParseConfigurationError(String::from(s))),
13-
}
14-
}
15-
}
16-
17-
impl std::string::ToString for $enum_name {
18-
fn to_string(&self) -> String {
19-
match self {
20-
$($enum_name::$member_name => String::from($string_value)),*,
21-
}
22-
}
23-
}
24-
};
25-
}
26-
275
/// Semi colon possibilities.
286
#[derive(Clone, PartialEq, Copy, Serialize, Deserialize)]
297
#[serde(rename_all = "camelCase")]

0 commit comments

Comments
 (0)