Migrates to Rust 2021

pull/171/head
Tpt 3 years ago
parent f6dbb96327
commit 97bb227042
  1. 2
      js/Cargo.toml
  2. 1
      js/src/model.rs
  3. 1
      js/src/store.rs
  4. 2
      lib/Cargo.toml
  5. 18
      lib/benches/store.rs
  6. 1
      lib/src/model/dataset.rs
  7. 1
      lib/src/model/graph.rs
  8. 1
      lib/src/model/interning.rs
  9. 1
      lib/src/model/xsd/date_time.rs
  10. 1
      lib/src/model/xsd/decimal.rs
  11. 1
      lib/src/model/xsd/duration.rs
  12. 1
      lib/src/sparql/algebra.rs
  13. 1
      lib/src/sparql/eval.rs
  14. 1
      lib/src/sparql/mod.rs
  15. 8
      lib/src/sparql/model.rs
  16. 1
      lib/src/storage/mod.rs
  17. 1
      lib/src/storage/numeric_encoder.rs
  18. 2
      lib/src/storage/small_string.rs
  19. 1
      lib/src/store.rs
  20. 2
      python/Cargo.toml
  21. 1
      python/src/model.rs
  22. 1
      python/src/store.rs
  23. 2
      server/Cargo.toml
  24. 2
      spargebra/Cargo.toml
  25. 1
      spargebra/src/parser.rs
  26. 1
      spargebra/src/query.rs
  27. 1
      spargebra/src/term.rs
  28. 1
      spargebra/src/update.rs
  29. 2
      testsuite/Cargo.toml
  30. 2
      wikibase/Cargo.toml

@ -7,7 +7,7 @@ readme = "README.md"
keywords = ["RDF", "N-Triples", "Turtle", "RDF/XML", "SPARQL"]
repository = "https://github.com/oxigraph/oxigraph/tree/master/js"
description = "JavaScript bindings of Oxigraph"
edition = "2018"
edition = "2021"
[lib]
crate-type = ["cdylib"]

@ -5,7 +5,6 @@ use crate::utils::to_err;
use js_sys::{Reflect, UriError};
use oxigraph::model::*;
use oxigraph::sparql::Variable;
use std::convert::TryFrom;
use std::sync::Arc;
use wasm_bindgen::prelude::*;

@ -6,7 +6,6 @@ use oxigraph::io::{DatasetFormat, GraphFormat};
use oxigraph::model::*;
use oxigraph::sparql::QueryResults;
use oxigraph::store::Store;
use std::convert::{TryFrom, TryInto};
use std::io::Cursor;
use wasm_bindgen::prelude::*;

@ -11,7 +11,7 @@ homepage = "https://oxigraph.org/"
description = """
a SPARQL database and RDF toolkit
"""
edition = "2018"
edition = "2021"
[package.metadata.docs.rs]
all-features = true

@ -16,9 +16,9 @@ fn graph_load_bench(c: &mut Criterion) {
let mut group = c.benchmark_group("graph");
group.nresamples(10);
group.sample_size(10);
for size in [100, 1_000, 10_000].iter() {
group.throughput(Throughput::Elements(*size as u64));
let triples: Vec<_> = create_quads(*size).into_iter().map(Triple::from).collect();
for size in [100, 1_000, 10_000] {
group.throughput(Throughput::Elements(size as u64));
let triples: Vec<_> = create_quads(size).into_iter().map(Triple::from).collect();
group.bench_function(BenchmarkId::from_parameter(size), |b| {
b.iter(|| triples.iter().collect::<Graph>());
});
@ -30,9 +30,9 @@ fn dataset_load_bench(c: &mut Criterion) {
let mut group = c.benchmark_group("dataset");
group.nresamples(10);
group.sample_size(10);
for size in [100, 1_000, 10_000].iter() {
group.throughput(Throughput::Elements(*size as u64));
let quads = create_quads(*size);
for size in [100, 1_000, 10_000] {
group.throughput(Throughput::Elements(size as u64));
let quads = create_quads(size);
group.bench_function(BenchmarkId::from_parameter(size), |b| {
b.iter(|| quads.iter().collect::<Dataset>());
});
@ -44,9 +44,9 @@ fn sled_load_bench(c: &mut Criterion) {
let mut group = c.benchmark_group("sled");
group.nresamples(10);
group.sample_size(10);
for size in [100, 1_000, 10_000].iter() {
group.throughput(Throughput::Elements(*size as u64));
let quads = create_quads(*size);
for size in [100, 1_000, 10_000] {
group.throughput(Throughput::Elements(size as u64));
let quads = create_quads(size);
group.bench_function(BenchmarkId::from_parameter(size), |b| {
b.iter(|| {
let store = Store::new().unwrap();

@ -34,7 +34,6 @@ use std::collections::BTreeSet;
use std::collections::{HashMap, HashSet};
use std::hash::{Hash, Hasher};
use std::io::{BufRead, Write};
use std::iter::FromIterator;
use std::{fmt, io};
/// An in-memory [RDF dataset](https://www.w3.org/TR/rdf11-concepts/#dfn-rdf-dataset).

@ -23,7 +23,6 @@ use crate::io::GraphFormat;
use crate::model::dataset::*;
use crate::model::*;
use std::io::{BufRead, Write};
use std::iter::FromIterator;
use std::{fmt, io};
/// An in-memory [RDF graph](https://www.w3.org/TR/rdf11-concepts/#dfn-graph).

@ -3,7 +3,6 @@
use crate::model::*;
use lasso::{Key, Rodeo, Spur};
use std::collections::HashMap;
use std::convert::TryInto;
#[derive(Debug, Default)]
pub struct Interner {

@ -5,7 +5,6 @@ use crate::model::xsd::parser::{
g_year_month_lexical_rep,
};
use std::cmp::{min, Ordering};
use std::convert::{TryFrom, TryInto};
use std::error::Error;
use std::fmt;
use std::hash::{Hash, Hasher};

@ -1,6 +1,5 @@
use crate::model::xsd::double::Double;
use crate::model::xsd::Float;
use std::convert::{TryFrom, TryInto};
use std::error::Error;
use std::fmt;
use std::fmt::Write;

@ -2,7 +2,6 @@ use super::decimal::DecimalOverflowError;
use super::parser::*;
use super::*;
use std::cmp::Ordering;
use std::convert::TryFrom;
use std::fmt;
use std::ops::Neg;
use std::str::FromStr;

@ -6,7 +6,6 @@
use crate::model::*;
use spargebra::GraphUpdateOperation;
use std::convert::TryFrom;
use std::fmt;
use std::str::FromStr;

@ -22,7 +22,6 @@ use spargebra::algebra::GraphPattern;
use std::cmp::Ordering;
use std::collections::hash_map::DefaultHasher;
use std::collections::{HashMap, HashSet};
use std::convert::{TryFrom, TryInto};
use std::hash::{Hash, Hasher};
use std::iter::Iterator;
use std::iter::{empty, once};

@ -32,7 +32,6 @@ use crate::sparql::service::{EmptyServiceHandler, ErrorConversionServiceHandler}
use crate::sparql::update::SimpleUpdateEvaluator;
use crate::storage::Storage;
pub use spargebra::ParseError;
use std::convert::TryInto;
use std::rc::Rc;
use std::time::Duration;

@ -517,7 +517,7 @@ fn test_serialization_rountrip() -> Result<(), EvaluationError> {
use std::io::Cursor;
use std::str;
for format in &[
for format in [
QueryResultsFormat::Json,
QueryResultsFormat::Xml,
QueryResultsFormat::Tsv,
@ -583,10 +583,10 @@ fn test_serialization_rountrip() -> Result<(), EvaluationError> {
for ex in results {
let mut buffer = Vec::new();
ex.write(&mut buffer, *format)?;
let ex2 = QueryResults::read(Cursor::new(buffer.clone()), *format)?;
ex.write(&mut buffer, format)?;
let ex2 = QueryResults::read(Cursor::new(buffer.clone()), format)?;
let mut buffer2 = Vec::new();
ex2.write(&mut buffer2, *format)?;
ex2.write(&mut buffer2, format)?;
assert_eq!(
str::from_utf8(&buffer).unwrap(),
str::from_utf8(&buffer2).unwrap()

@ -24,7 +24,6 @@ use crate::storage::numeric_encoder::{EncodedQuad, EncodedTerm, StrHash, StrLook
use fallback_backend::{Db, Iter, Tree};
#[cfg(not(target_arch = "wasm32"))]
use sled_backend::{Db, Iter, Tree};
use std::convert::TryInto;
mod binary_encoder;
#[cfg(target_arch = "wasm32")]

@ -6,7 +6,6 @@ use crate::model::*;
use crate::sparql::EvaluationError;
use crate::storage::small_string::SmallString;
use siphasher::sip128::{Hasher128, SipHasher24};
use std::convert::{TryFrom, TryInto};
use std::error::Error;
use std::fmt::Debug;
use std::hash::Hash;

@ -1,7 +1,5 @@
use std::borrow::Borrow;
use std::cmp::Ordering;
use std::convert::TryFrom;
use std::convert::TryInto;
use std::error::Error;
use std::fmt;
use std::hash::{Hash, Hasher};

@ -39,7 +39,6 @@ use crate::storage::{ChainedDecodingQuadIterator, DecodingGraphIterator, Storage
pub use crate::storage::{
ConflictableTransactionError, TransactionError, UnabortableTransactionError,
};
use std::convert::TryInto;
use std::io::{BufRead, Write};
use std::path::Path;
use std::{fmt, io, str};

@ -8,7 +8,7 @@ keywords = ["RDF", "SPARQL", "graph-database", "database"]
repository = "https://github.com/oxigraph/oxigraph/tree/master/python"
homepage = "https://oxigraph.org/pyoxigraph/"
description = "Python bindings of Oxigraph, a SPARQL database and RDF toolkit"
edition = "2018"
edition = "2021"
[lib]
crate-type = ["cdylib"]

@ -5,7 +5,6 @@ use pyo3::exceptions::{PyIndexError, PyNotImplementedError, PyTypeError, PyValue
use pyo3::prelude::*;
use pyo3::{PyIterProtocol, PyMappingProtocol, PyObjectProtocol, PyTypeInfo};
use std::collections::hash_map::DefaultHasher;
use std::convert::TryFrom;
use std::hash::Hash;
use std::hash::Hasher;
use std::vec::IntoIter;

@ -9,7 +9,6 @@ use pyo3::prelude::{
pyclass, pymethods, pyproto, Py, PyAny, PyObject, PyRef, PyRefMut, PyResult, Python,
};
use pyo3::{PyIterProtocol, PyObjectProtocol, PySequenceProtocol};
use std::convert::{TryFrom, TryInto};
use std::io::BufReader;
/// Disk-based RDF store.

@ -9,7 +9,7 @@ homepage = "https://oxigraph.org/server/"
description = """
SPARQL server based on Oxigraph
"""
edition = "2018"
edition = "2021"
[dependencies]
oxhttp = "0.1"

@ -10,7 +10,7 @@ homepage = "https://oxigraph.org/"
description = """
A SPARQL parser
"""
edition = "2018"
edition = "2021"
[features]
default = []

@ -9,7 +9,6 @@ use peg::str::LineCol;
use rand::random;
use std::borrow::Cow;
use std::collections::{HashMap, HashSet};
use std::convert::{TryFrom, TryInto};
use std::error::Error;
use std::mem::take;
use std::str::Chars;

@ -2,7 +2,6 @@ use crate::algebra::*;
use crate::parser::{parse_query, ParseError};
use crate::term::*;
use oxiri::Iri;
use std::convert::TryFrom;
use std::fmt;
use std::str::FromStr;

@ -1,6 +1,5 @@
//! Data structures for [RDF 1.1 Concepts](https://www.w3.org/TR/rdf11-concepts/) like IRI, literal or triples.
use std::convert::{TryFrom, TryInto};
use std::fmt;
use std::fmt::Write;

@ -2,7 +2,6 @@ use crate::algebra::*;
use crate::parser::{parse_update, ParseError};
use crate::term::*;
use oxiri::Iri;
use std::convert::TryFrom;
use std::fmt;
use std::str::FromStr;

@ -8,7 +8,7 @@ repository = "https://github.com/oxigraph/oxigraph"
description = """
Implementation of W3C testsuites for Oxigraph
"""
edition = "2018"
edition = "2021"
publish = false
[dependencies]

@ -8,7 +8,7 @@ repository = "https://github.com/oxigraph/oxigraph/tree/master/wikibase"
description = """
SPARQL server based on Oxigraph for Wikibase instances
"""
edition = "2018"
edition = "2021"
[dependencies]
clap = "2"

Loading…
Cancel
Save