Skip to content

Commit 61989d0

Browse files
committed
refactor: remove the FieldKind::Bytes variant and use FieldKind::String instead.
1 parent ecc12dc commit 61989d0

File tree

4 files changed

+6
-9
lines changed

4 files changed

+6
-9
lines changed

lib/src/modules/mod.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ pub mod mods {
401401
}
402402
RuntimeType::Bool => FieldKind::Bool,
403403
RuntimeType::String => FieldKind::String,
404-
RuntimeType::VecU8 => FieldKind::Bytes,
404+
RuntimeType::VecU8 => FieldKind::String,
405405
RuntimeType::Enum(_) => FieldKind::Integer,
406406
RuntimeType::Message(m) => {
407407
FieldKind::Struct(Struct::new(m))
@@ -433,8 +433,6 @@ pub mod mods {
433433
Bool,
434434
/// A string.
435435
String,
436-
/// A bytes sequence.
437-
Bytes,
438436
/// A structure.
439437
Struct(Struct),
440438
/// An array.

lib/src/modules/tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -371,19 +371,19 @@ fn test_reflect() {
371371

372372
let field = fields.next().unwrap();
373373
assert_eq!(field.name(), "bytes_foo");
374-
assert_eq!(field.kind(), FieldKind::Bytes);
374+
assert_eq!(field.kind(), FieldKind::String);
375375

376376
let field = fields.next().unwrap();
377377
assert_eq!(field.name(), "bytes_bar");
378-
assert_eq!(field.kind(), FieldKind::Bytes);
378+
assert_eq!(field.kind(), FieldKind::String);
379379

380380
let field = fields.next().unwrap();
381381
assert_eq!(field.name(), "bytes_raw");
382-
assert_eq!(field.kind(), FieldKind::Bytes);
382+
assert_eq!(field.kind(), FieldKind::String);
383383

384384
let field = fields.next().unwrap();
385385
assert_eq!(field.name(), "bytes_undef");
386-
assert_eq!(field.kind(), FieldKind::Bytes);
386+
assert_eq!(field.kind(), FieldKind::String);
387387

388388
let field = fields.next().unwrap();
389389
assert_eq!(field.name(), "enumeration");

ls/src/features/completion.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,6 @@ fn kind_to_string(k: &FieldKind) -> String {
437437
FieldKind::Float => "float".to_string(),
438438
FieldKind::Bool => "bool".to_string(),
439439
FieldKind::String => "string".to_string(),
440-
FieldKind::Bytes => "bytes".to_string(),
441440
FieldKind::Struct(_) => "struct".to_string(),
442441
FieldKind::Array(inner) => format!("array<{}>", kind_to_string(inner)),
443442
FieldKind::Map(key, value) => {

ls/src/tests/testdata/completion8.response.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
{
339339
"label": "pdb_path",
340340
"labelDetails": {
341-
"description": "bytes"
341+
"description": "string"
342342
},
343343
"kind": 5
344344
},

0 commit comments

Comments
 (0)