Skip to content

Commit

Permalink
cleanup and dependency upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
proycon committed Sep 22, 2024
1 parent 8038e7e commit fa159c8
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 14 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ keywords = [ "text-processing", "annotation", "linguistics", "standoff", "nlp"]
[dependencies]
chrono = { version = "0.4.38", features = ["serde"] }
sealed = "0.5.0"
serde = { version = "1.0.209", features = ["derive"] }
serde_json = "1.0.127"
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
serde_path_to_error = "0.1.16"
smallvec = { version = "1.13.2", features = ["union"] }
regex = "1.10.6"
nanoid = "0.4.0"
csv = "1.3.0"
datasize = { version = "0.2.15", features = ["smallvec-types"] }
minicbor = { version = "0.24.2", features = ["derive","std" ] }
minicbor = { version = "0.25.1", features = ["derive","std" ] }
rayon = "1.10.0"
sha1 = "0.10.6"
base16ct = { version = "0.2.0", features = ["alloc"] }
Expand Down
2 changes: 1 addition & 1 deletion src/annotationdataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -905,7 +905,7 @@ impl<'de> serde::de::Visitor<'de> for AnnotationDataSetVisitor<'_> {
eprintln!(
"Notice: Ignoring unknown key '{key}' whilst parsing AnnotationDataSet"
);
map.next_value()?; //read and discard the value
let _value: Self::Value = map.next_value()?; //read and discard the value
}
}
}
Expand Down
7 changes: 2 additions & 5 deletions src/annotationstore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use serde::de::DeserializeSeed;
use serde::ser::{SerializeSeq, SerializeStruct, Serializer};
use serde::Serialize;
use smallvec::{smallvec, SmallVec};
use std::borrow::Cow;
use std::cmp::Ordering;
use std::collections::BTreeSet;
use std::path::{Path, PathBuf};
Expand All @@ -38,9 +37,7 @@ use crate::datakey::DataKeyHandle;
use crate::error::*;
use crate::file::*;
use crate::json::{FromJson, ToJson};
use crate::resources::{
DeserializeTextResource, TextResource, TextResourceBuilder, TextResourceHandle,
};
use crate::resources::{DeserializeTextResource, TextResource, TextResourceHandle};
use crate::selector::{Offset, OffsetMode, Selector, SelectorBuilder};
use crate::store::*;
use crate::substore::{AnnotationSubStore, AnnotationSubStoreHandle};
Expand Down Expand Up @@ -2483,7 +2480,7 @@ impl<'de> serde::de::Visitor<'de> for AnnotationStoreVisitor<'_> {
eprintln!(
"Notice: Ignoring unknown key '{key}' whilst parsing AnnotationStore"
);
map.next_value()?; //read and discard the value
let _value: Self::Value = map.next_value()?; //read and discard the value
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ use crate::annotationstore::AnnotationStore;
use crate::datakey::{DataKey, DataKeyHandle};
use crate::datavalue::{DataOperator, DataValue};
use crate::resources::{TextResource, TextResourceHandle};
use crate::substore::{AnnotationSubStore, AnnotationSubStoreHandle};
use crate::substore::AnnotationSubStoreHandle;
use crate::textselection::{TextSelection, TextSelectionOperator};

use crate::{store::*, Offset, TextSelectionHandle};
Expand Down
2 changes: 1 addition & 1 deletion src/resources.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::annotationstore::AnnotationStore;
use crate::config::{Config, Configurable, SerializeMode};
use crate::error::StamError;
use crate::file::*;
use crate::json::{FromJson, ToJson};
use crate::json::ToJson;
use crate::selector::{Offset, Selector, SelfSelector};
use crate::store::*;
use crate::text::*;
Expand Down
6 changes: 3 additions & 3 deletions src/substore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ impl AnnotationSubStore {

/// Sets the parent of this substore, may be called multiple times to add multiple parents!
/// The value is wrapped in an option, None means the root store is the parent
fn with_parent(mut self, index: Option<AnnotationSubStoreHandle>) -> Self {
pub fn with_parent(mut self, index: Option<AnnotationSubStoreHandle>) -> Self {
self.add_parent(index);
self
}

/// Sets the parent of this substore, may be called multiple times to add multiple parents!
/// The value is wrapped in an option, None means the root store is the parent
fn add_parent(&mut self, index: Option<AnnotationSubStoreHandle>) {
pub fn add_parent(&mut self, index: Option<AnnotationSubStoreHandle>) {
self.parents.push(index);
}

/// Sets the parents of this substore
fn with_parents(mut self, parents: Vec<Option<AnnotationSubStoreHandle>>) -> Self {
pub fn with_parents(mut self, parents: Vec<Option<AnnotationSubStoreHandle>>) -> Self {
self.parents = parents;
self
}
Expand Down

0 comments on commit fa159c8

Please sign in to comment.