Skip to content

Commit

Permalink
closes #43 Number=,
Browse files Browse the repository at this point in the history
  • Loading branch information
brentp committed Nov 11, 2024
1 parent 7500ac7 commit 9c1bc4c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
6 changes: 4 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
v0.2.1 (dev)
============

v0.2.1
======
+ bump stream-vbyte for performance annotating
+ fix #43 where output vcf would have Number=, unless number was specified in config.json

v0.2.0
======
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "echtvar"
version = "0.2.0"
version = "0.2.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
13 changes: 6 additions & 7 deletions src/lib/fields.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use serde::{Deserialize, Serialize}; // 1.0.101

#[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd, Clone)]
#[derive(Default)]
#[derive(Debug, Deserialize, Serialize, PartialEq, PartialOrd, Clone, Default)]
pub enum FieldType {
#[default]
Integer,
Expand All @@ -27,18 +26,20 @@ pub struct Field {
pub multiplier: u32,
#[serde(default)]
pub ftype: FieldType,
#[serde(default)]
#[serde(default = "default_number")]
pub number: std::string::String,



#[serde(default = "default_values_i", skip_serializing)]
pub values_i: usize,
}

fn default_missing_value() -> i32 {
-1
}

fn default_number() -> std::string::String {
"1".to_string()
}
fn default_missing_string() -> std::string::String {
"MISSING".to_string()
}
Expand Down Expand Up @@ -69,8 +70,6 @@ impl Default for Field {
}
}



#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 9c1bc4c

Please sign in to comment.