Skip to content

Commit

Permalink
fix ci (fmt, clippy, test case)
Browse files Browse the repository at this point in the history
Signed-off-by: T.C. <[email protected]>
  • Loading branch information
up9cloud committed Sep 19, 2023
1 parent 74e5668 commit 026e3ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/file/format/jsonc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ fn from_jsonc_value(uri: Option<&String>, value: JsonValue) -> Value {
let vk = match value {
JsonValue::Null => ValueKind::Nil,
JsonValue::String(v) => ValueKind::String(v.to_string()),
JsonValue::Number(ref value) => {
if let Ok(value) = value.parse::<i64>() {
ValueKind::I64(value)
} else if let Ok(value) = value.parse::<f64>() {
ValueKind::Float(value)
JsonValue::Number(number) => {
if let Ok(v) = number.parse::<i64>() {
ValueKind::I64(v)
} else if let Ok(v) = number.parse::<f64>() {
ValueKind::Float(v)
} else {
unreachable!();
}
},
}
JsonValue::Boolean(v) => ValueKind::Boolean(v),
JsonValue::Object(table) => {
let m = table
Expand Down
2 changes: 1 addition & 1 deletion tests/file_jsonc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn test_file() {
assert_eq!(s.place.telephone, None);
assert_eq!(s.elements.len(), 10);
assert_eq!(s.elements[3], "4".to_string());
if cfg!(feature = "preserve_order") {
if cfg!(feature = "TODO: preserve_order") {
assert_eq!(
s.place
.creator
Expand Down

0 comments on commit 026e3ac

Please sign in to comment.